mohsen programmer Member May 9, 2025 #1 Hi, Which approach is better for implementing a user interface: direct coding or using Designer (layout)? Which method offers greater speed and is more standard? Furthermore, if the UI is implemented with a layout, is it possible for it and the .bal files to be decompiled and stolen? If so, how can this be prevented?
Hi, Which approach is better for implementing a user interface: direct coding or using Designer (layout)? Which method offers greater speed and is more standard? Furthermore, if the UI is implemented with a layout, is it possible for it and the .bal files to be decompiled and stolen? If so, how can this be prevented?
mohsen programmer Member May 10, 2025 #2 I checked, and the .bal files are extracted from the Assets folder after decompilation, which can be opened in the designer of another B4A project. How can we prevent the theft of the application's user interface? Upvote 0
I checked, and the .bal files are extracted from the Assets folder after decompilation, which can be opened in the designer of another B4A project. How can we prevent the theft of the application's user interface?
aeric Expert Licensed User Longtime User May 10, 2025 #3 mohsen programmer said: I checked, and the .bal files are extracted from the Assets folder after decompilation, which can be opened in the designer of another B4A project. How can we prevent the theft of the application's user interface? Click to expand... If the layout files are stolen, either the person is also a B4X member or he needs to learn B4X. In assets folder, there maybe other files like strings.db, json and PNG files. Nothing much can be done. For me the code is more valuable. Upvote 0
mohsen programmer said: I checked, and the .bal files are extracted from the Assets folder after decompilation, which can be opened in the designer of another B4A project. How can we prevent the theft of the application's user interface? Click to expand... If the layout files are stolen, either the person is also a B4X member or he needs to learn B4X. In assets folder, there maybe other files like strings.db, json and PNG files. Nothing much can be done. For me the code is more valuable.
mohsen programmer Member May 10, 2025 #4 aeric said: If the layout files are stolen, either the person is also a B4X member or he needs to learn B4X. In assets folder, there maybe other files like strings.db, json and PNG files. Nothing much can be done. For me the code is more valuable. Click to expand... Thank you very much for your answer, but UI design with Designer is much faster and more efficient. I am also very interested to know @Erel answer. Upvote 0
aeric said: If the layout files are stolen, either the person is also a B4X member or he needs to learn B4X. In assets folder, there maybe other files like strings.db, json and PNG files. Nothing much can be done. For me the code is more valuable. Click to expand... Thank you very much for your answer, but UI design with Designer is much faster and more efficient. I am also very interested to know @Erel answer.
mcqueccu Expert Licensed User Longtime User May 10, 2025 #5 By looking at your interface without decompiling, a person can recreate your interface exactly. Its the code that matters Upvote 0
By looking at your interface without decompiling, a person can recreate your interface exactly. Its the code that matters
epiCode Active Member Licensed User May 10, 2025 #6 mohsen programmer said: Hi, Which approach is better for implementing a user interface: direct coding or using Designer (layout)? Which method offers greater speed and is more standard? Furthermore, if the UI is implemented with a layout, is it possible for it and the .bal files to be decompiled and stolen? If so, how can this be prevented? Click to expand... Generation of interface by coding is way faster then loading a layout. Use it only if your interface has too many elements. As for theft, all apk can be decompiled. A general thumb rule is that if it runs, it can be hacked. Upvote 0
mohsen programmer said: Hi, Which approach is better for implementing a user interface: direct coding or using Designer (layout)? Which method offers greater speed and is more standard? Furthermore, if the UI is implemented with a layout, is it possible for it and the .bal files to be decompiled and stolen? If so, how can this be prevented? Click to expand... Generation of interface by coding is way faster then loading a layout. Use it only if your interface has too many elements. As for theft, all apk can be decompiled. A general thumb rule is that if it runs, it can be hacked.
aeric Expert Licensed User Longtime User May 10, 2025 #7 I never like the idea of using code to generate the layout. For me, designing the layout have more benefits. Straight away you can preview using B4A designer app. Future editing, you don't need to remember and interpret the code like a machine. Easier distribution and sharing of project. Another developer can easily recognize the design. Using anchor and calculation of position are much easier Usage of designer script and DSE Convenient of copy and paste on another platforms I believe on separation of concern, RAD and fast prototyping Make code less complex and shorter Drag and drop, resizing, layer, positioning, show and hide, choose colors, fonts or other properties Make more sense to me There are no right or wrong. More to personal preferences. Upvote 0
I never like the idea of using code to generate the layout. For me, designing the layout have more benefits. Straight away you can preview using B4A designer app. Future editing, you don't need to remember and interpret the code like a machine. Easier distribution and sharing of project. Another developer can easily recognize the design. Using anchor and calculation of position are much easier Usage of designer script and DSE Convenient of copy and paste on another platforms I believe on separation of concern, RAD and fast prototyping Make code less complex and shorter Drag and drop, resizing, layer, positioning, show and hide, choose colors, fonts or other properties Make more sense to me There are no right or wrong. More to personal preferences.
epiCode Active Member Licensed User May 10, 2025 #8 aeric said: I never like the idea of using code to generate the layout. For me, designing the layout have more benefits. Straight away you can preview using B4A designer app. Future editing, you don't need to remember and interpret the code like a machine. Easier distribution and sharing of project. Another developer can easily recognize the design. Using anchor and calculation of position are much easier Usage of designer script and DSE Convenient of copy and paste on another platforms I believe on separation of concern, RAD and fast prototyping Make code less complex and shorter Drag and drop, resizing, layer, positioning, show and hide, choose colors, fonts or other properties Make more sense to me There are no right or wrong. More to personal preferences. Click to expand... You are right. However in instances where you are creating a complex layout in lots of cards in lets say a large xCLV list using code is better than layout IMO. Upvote 0
aeric said: I never like the idea of using code to generate the layout. For me, designing the layout have more benefits. Straight away you can preview using B4A designer app. Future editing, you don't need to remember and interpret the code like a machine. Easier distribution and sharing of project. Another developer can easily recognize the design. Using anchor and calculation of position are much easier Usage of designer script and DSE Convenient of copy and paste on another platforms I believe on separation of concern, RAD and fast prototyping Make code less complex and shorter Drag and drop, resizing, layer, positioning, show and hide, choose colors, fonts or other properties Make more sense to me There are no right or wrong. More to personal preferences. Click to expand... You are right. However in instances where you are creating a complex layout in lots of cards in lets say a large xCLV list using code is better than layout IMO.
aeric Expert Licensed User Longtime User May 10, 2025 #9 epiCode said: You are right. However in instances where you are creating a complex layout in lots of cards in lets say a large xCLV list using code is better than layout IMO. Click to expand... I don't agree. For me, using layout solve the problem of creating a complex CustomListview items. In a current project I am working on, I have solved the previous developer problem by replacing the original code by layout design. Upvote 0
epiCode said: You are right. However in instances where you are creating a complex layout in lots of cards in lets say a large xCLV list using code is better than layout IMO. Click to expand... I don't agree. For me, using layout solve the problem of creating a complex CustomListview items. In a current project I am working on, I have solved the previous developer problem by replacing the original code by layout design.
Erel B4X founder Staff member Licensed User Longtime User May 11, 2025 #10 I highly recommend using the designer. In addition to the excellent points @aeric wrote, layout files are mostly cross platform and they handle screen size changes, something that is more difficult to do programmatically. Upvote 0
I highly recommend using the designer. In addition to the excellent points @aeric wrote, layout files are mostly cross platform and they handle screen size changes, something that is more difficult to do programmatically.
mohsen programmer Member May 11, 2025 #11 Erel said: I highly recommend using the designer. In addition to the excellent points @aeric wrote, layout files are mostly cross platform and they handle screen size changes, something that is more difficult to do programmatically. Click to expand... Thank you sincerely for your response Definitely, using layouts has many advantages. However, the only problem is that others can access my application's layout files, potentially steal them, and misuse them. Is there a solution for this? Upvote 0
Erel said: I highly recommend using the designer. In addition to the excellent points @aeric wrote, layout files are mostly cross platform and they handle screen size changes, something that is more difficult to do programmatically. Click to expand... Thank you sincerely for your response Definitely, using layouts has many advantages. However, the only problem is that others can access my application's layout files, potentially steal them, and misuse them. Is there a solution for this?
mohsen programmer Member May 11, 2025 #12 mohsen programmer said: Thank you sincerely for your response Definitely, using layouts has many advantages. However, the only problem is that others can access my application's layout files, potentially steal them, and misuse them. Is there a solution for this? Click to expand... ? Upvote 0
mohsen programmer said: Thank you sincerely for your response Definitely, using layouts has many advantages. However, the only problem is that others can access my application's layout files, potentially steal them, and misuse them. Is there a solution for this? Click to expand... ?
Q QSerg Member May 12, 2025 #13 For quick development simple apps designer is indispensable. For ultimate flexibility and control you may wish to do it programmatically. Upvote 0
For quick development simple apps designer is indispensable. For ultimate flexibility and control you may wish to do it programmatically.
Erel B4X founder Staff member Licensed User Longtime User May 12, 2025 #14 mohsen programmer said: However, the only problem is that others can access my application's layout files, potentially steal them, and misuse them. Is there a solution for this? Click to expand... This is true no matter how you implement your UI. Whether it is a website, an app developed with Java/Kotlin or an app developed with B4X. Even if you implement your layout with assembler. How difficult is to steal the image files and copy the layout by hand? Upvote 0
mohsen programmer said: However, the only problem is that others can access my application's layout files, potentially steal them, and misuse them. Is there a solution for this? Click to expand... This is true no matter how you implement your UI. Whether it is a website, an app developed with Java/Kotlin or an app developed with B4X. Even if you implement your layout with assembler. How difficult is to steal the image files and copy the layout by hand?
aeric Expert Licensed User Longtime User May 12, 2025 #15 QSerg said: For quick development simple apps designer is indispensable. For ultimate flexibility and control you may wish to do it programmatically. Click to expand... Can you give example of complex design that you wish to programmatically create it which layout file is very difficult to achieve? Does it involve some kind of custom animation? Upvote 0
QSerg said: For quick development simple apps designer is indispensable. For ultimate flexibility and control you may wish to do it programmatically. Click to expand... Can you give example of complex design that you wish to programmatically create it which layout file is very difficult to achieve? Does it involve some kind of custom animation?
peacemaker Expert Licensed User Longtime User May 12, 2025 #16 There are such apps where one B4XPage\activity\window contains several containers that each should be filled with variable (and scrollable) layouts that also have containers for the next sub-layouts. It's unthinkable to imagine how to do it without the Designer. Upvote 0
There are such apps where one B4XPage\activity\window contains several containers that each should be filled with variable (and scrollable) layouts that also have containers for the next sub-layouts. It's unthinkable to imagine how to do it without the Designer.
AnandGupta Expert Licensed User Longtime User May 12, 2025 #17 mohsen programmer said: Hi, Which approach is better for implementing a user interface: direct coding or using Designer (layout)? Which method offers greater speed and is more standard? Furthermore, if the UI is implemented with a layout, is it possible for it and the .bal files to be decompiled and stolen? If so, how can this be prevented? Click to expand... Which approach is better for implementing a user interface: direct coding or using Designer (layout)? Ans: Designer (layout) + DSE + Anchors etc. Which method offers greater speed and is more standard? Ans: Designer (layout), WYSIWYG if the UI is implemented with a layout, is it possible for it and the .bal files to be decompiled and stolen? Ans: Yes, even if you write by code, once run your design can be copied (stolen). A screen-shot is enough for us to design similar layout, most of the time. All these are already answered by members here, still I put it point by point, so that there is no confusion. Upvote 0
mohsen programmer said: Hi, Which approach is better for implementing a user interface: direct coding or using Designer (layout)? Which method offers greater speed and is more standard? Furthermore, if the UI is implemented with a layout, is it possible for it and the .bal files to be decompiled and stolen? If so, how can this be prevented? Click to expand... Which approach is better for implementing a user interface: direct coding or using Designer (layout)? Ans: Designer (layout) + DSE + Anchors etc. Which method offers greater speed and is more standard? Ans: Designer (layout), WYSIWYG if the UI is implemented with a layout, is it possible for it and the .bal files to be decompiled and stolen? Ans: Yes, even if you write by code, once run your design can be copied (stolen). A screen-shot is enough for us to design similar layout, most of the time. All these are already answered by members here, still I put it point by point, so that there is no confusion.
Q QSerg Member May 12, 2025 #18 aeric said: Can you give example of complex design that you wish to programmatically create it which layout file is very difficult to achieve? Does it involve some kind of custom animation? Click to expand... I do not develop over-complicated animated apps. My apps rather static and simple from layout point of view. However they do include many different views (or pages, whatever you call them). When I tried to use pages in layout designer I found it over confusing and over-complicated. Thus I wrote few subs that hide/unhide, reposition and change dimensions of elements on the screen. So it is the same screen, but looks differently and re-utilize the same controls. I personally found this approach by far easiest. In B4A I greatly missing ultimate flexibility of forms and frames found in VB6 (or VBA) where without any fuss I can switch between them in any imaginable ways. Upvote 0
aeric said: Can you give example of complex design that you wish to programmatically create it which layout file is very difficult to achieve? Does it involve some kind of custom animation? Click to expand... I do not develop over-complicated animated apps. My apps rather static and simple from layout point of view. However they do include many different views (or pages, whatever you call them). When I tried to use pages in layout designer I found it over confusing and over-complicated. Thus I wrote few subs that hide/unhide, reposition and change dimensions of elements on the screen. So it is the same screen, but looks differently and re-utilize the same controls. I personally found this approach by far easiest. In B4A I greatly missing ultimate flexibility of forms and frames found in VB6 (or VBA) where without any fuss I can switch between them in any imaginable ways.
aeric Expert Licensed User Longtime User May 13, 2025 #19 QSerg said: I do not develop over-complicated animated apps. My apps rather static and simple from layout point of view. However they do include many different views (or pages, whatever you call them). When I tried to use pages in layout designer I found it over confusing and over-complicated. Thus I wrote few subs that hide/unhide, reposition and change dimensions of elements on the screen. So it is the same screen, but looks differently and re-utilize the same controls. I personally found this approach by far easiest. In B4A I greatly missing ultimate flexibility of forms and frames found in VB6 (or VBA) where without any fuss I can switch between them in any imaginable ways. Click to expand... We can't compare the era of VB6 with nowadays. These days, the UI design can be more complex. VB6 is too limited to produce such design today. CustomListview is very powerful if you know how to use it. Sometimes you just need to create a few more smaller parts layout to handle the dynamic layout. Don't forget a panel can hold another layout and have another layout or views nested inside it. For example, I have like 10 different layouts for my POS software where I can put the input pad on left, center or right. I also can have tabstrip inside CLV that scroll vertically and horizontally where the tabstrip can load 4 page and 5 pages based on the number of weeks in a month, 7 days a week or 5 days if exclude weekends. All these will definitely difficult by writing code to draw them. Another thing it is very slow to load by doing a lot of calculation. Upvote 0
QSerg said: I do not develop over-complicated animated apps. My apps rather static and simple from layout point of view. However they do include many different views (or pages, whatever you call them). When I tried to use pages in layout designer I found it over confusing and over-complicated. Thus I wrote few subs that hide/unhide, reposition and change dimensions of elements on the screen. So it is the same screen, but looks differently and re-utilize the same controls. I personally found this approach by far easiest. In B4A I greatly missing ultimate flexibility of forms and frames found in VB6 (or VBA) where without any fuss I can switch between them in any imaginable ways. Click to expand... We can't compare the era of VB6 with nowadays. These days, the UI design can be more complex. VB6 is too limited to produce such design today. CustomListview is very powerful if you know how to use it. Sometimes you just need to create a few more smaller parts layout to handle the dynamic layout. Don't forget a panel can hold another layout and have another layout or views nested inside it. For example, I have like 10 different layouts for my POS software where I can put the input pad on left, center or right. I also can have tabstrip inside CLV that scroll vertically and horizontally where the tabstrip can load 4 page and 5 pages based on the number of weeks in a month, 7 days a week or 5 days if exclude weekends. All these will definitely difficult by writing code to draw them. Another thing it is very slow to load by doing a lot of calculation.
peacemaker Expert Licensed User Longtime User May 13, 2025 #20 aeric said: a panel can hold another layout and have another layout or views nested inside it. Click to expand... Long list of the sub-layouts that are being dynamically loaded into the containers. It's impossible to create by code, i can't imagine the hardness of the manual work... Thanks to God Erel for the Designer. Last edited: May 13, 2025 Upvote 0
aeric said: a panel can hold another layout and have another layout or views nested inside it. Click to expand... Long list of the sub-layouts that are being dynamically loaded into the containers. It's impossible to create by code, i can't imagine the hardness of the manual work... Thanks to God Erel for the Designer.