Converting old AB over to new AB


Peter Bradstreet

Hi David,

I have spent some time going through the samples and the vuejs documentation and am ready to start creating my app in the new AB from the one that I have in the old AB.

I am having a challenge placing a variable into an html component, no doubt, I just have the wrong syntax. In the old AB I have a header container which contains an html component that displays the title of each view. I define the html in the component as:

In the 'show' code for each view I redefine the AppHeaderTitle e.g: SetVar "[AppHeaderTitle]" "My Profile" "String"

In the new AB I am using a frame called `HeaderFrame` and have placed an html component in the frame called `HeaderTitle`. I have tried different values in the html field with no luck. e.g:

(I imagine that this is where I am wrong).

In the show view event for a profile view I have set the value of the variable and confirmed that it is writing to the console:

Any help greatly appreciated

Pete


DecSoft

Hello Peter,

In principle, you are right, that is, it's the way to show a string variable (or his string represetation) inside an HTML template, like inside the HTML control. You can easily see it by copy this code ("as is", you can copy the below code into App Builder, so a new HTML controls is created with that text inside, ready to be tested):

So, if the "app.store.AppHeaderTitle" variable exists... then can be show in that way if you wanted. If the app contains some HTML you can try this other way instead:

In fact, I just try your suggested code, that is, I place the below code in an app view Show event:

And then, in the same app view (can be another too, but you already know it), I use an HTML control with the below code inside:

... and I get the expected result, that is the text "Home Screen" inside the HTML code. So, please, Peter, remove the "_cache" directory (perhaps is causing some problem?), even the "compiled" directory (paranoic mode), and try again, since your code look as the expected one.



Peter Bradstreet
Hi,

Thanks!, it must have been some kind of caching issue as I had to compile it several times before it would start working. Anyway, glad to know that I was on the right track. It looks like I could use your new resource manager to do much the same thing with the advantage that I can find them all in one place?

Speaking of finding things, will you be putting the Tools/Text Search feature into the new version, I found it really handy in the old version.

Cheers, Pete

DecSoft

Hello Peter,

Glad to know that you got it. The template syntax can be really useful, because we can deal with virtually any kind of variable type, so we not only show "simple" strings, but also HTML, arrays, objects, etc. We can also show or not certain stuff, etc. It's quite useful. You can take a look at the HTML sample app and play a bit with it.

About the app resources, they are not exactly the same thing than the app global / reactive variables. The resources can be easily translated to another languages, for example, by using the app languages manager.

About the Text search, yes, I know is a must in the IDE and I want to implement it as quickly as possible, which mean that I can't place a date here, because I am really busy with other lot of tasks! (Developing with both AB and AB2, in addition to other things!), but it's a must and therefore must be incorporated in the IDE sooner or later.



Peter Bradstreet
Hi, I started having issues again this morning and it appears that I might have tripped over a possible bug. If you make any changes to a frame, those changes are not reflected in any views that use that frame. The only way to see the changes is if you delete the frame from the view and then re-insert it. Is this the way that it is designed to work? If so, it is a bit painful as I will be using the same frame in about 90% of my views and it the frame may need to be modified over time.

DecSoft

Hello Peter.

I will try to take a look... of course it's not the desired nor the expected behaviour. The DecSoft App Builder cache is a bit more complex than before, since it's working now in a control level, not an app view level. On the other hand, the frame control is a bit more complex, since contain other controls, etc. But of course this don't mean that the things must works like you see now... I will take a look and see what we can do about: fix the problem, so the cache start working as expected.



DecSoft

Hello Peter,

Taking a look here... I can't reproduce any problem using frames related with the cache... that is, if I made a change in a control which is inside a frame, after I compile and run the app, I can see that change in any view that uses the frame. So apparently we are not talking about controls changes...

Before I post this message I also test to made changes in the frame controls events, searching for a possible problem while deal with the code, and not with the controls properties, but, again, I can't reproduce the problem: any new code that I introduce in a framed control, is there as expected at runtime.

So maybe you certainly find a bug... but we need a way to try to reproduce it, in order to search for a possible fix. Please, try to reproduce the problem, maybe in a new app, and therefore post here how you can reproduce the problem, in order to try it here by myself.

P.S. Maybe the problem is related in how you are launching / compile the app? Please, review this help topic. It's not the same to use the Run button, the Debug button, to save or not the app before compile or launch it, etc. Commonly we use the Debug button, since doing this the app is automatically saved (if needed) before be compiled and launched.



Peter Bradstreet
Strange, I will see if I can reproduce it in a new app and send it to you after doing some more testing.

Peter Bradstreet
Hi,

I have not been able to replicate the issue but the issue still exists in my app that I am just getting started with. If I clear the compiled folder out, it works properly but that is not needed in the frame example. Here is the app that doesn't want to play nicely.


DecSoft

Hello Peter,

I will try to reproduce the problem in your sample app, however, the new AB no more stores the app project stuff in a sole XML file, but separate the stuff in various files. So I can't just save the above file, but also, at least, the files that you can see inside the "__project" folder. Feel free to send that files to my E-Mail, or upload it to some thirdparty server or your own one and post here or send me a link to the zip. :-)



Peter Bradstreet
I have tried saving the .dab file into a different folder and it seems to have fixed the issue for some reason. The issue was getting worse and simple code changes were not getting picked up in the compiled js and the only way to get them picked up was to delete the compiled folder and recompile. Hopefully it will be good to go now in the new folder.

DecSoft

Hello Peter,

Who knows... the point is that you can deal with it. As I mention above, the new AB compiler cache is more complex, since works at a control level, everything trying to get our app compiled and launched as quickly as possible (commonly in less than a half of a second), so, even when I expend lot of time and work enhancing and fixing the compiler cache, it's completely possible that a bug exists or some mistake happen.

So, please, just continue posting here if you find a problem like that: what we wanted is to have the best Javascript IDE as possible, because we work on it everyday too, and want to work with the best tool as possible, allowing to coding without worries about his errors, bugs, etc. In fact I must say that the overall results are more than satisfactory: AB2 is better than AB, in lot, lot of aspects. And we can feel it when develop with it.

P.S. We continue working in projects using AB, so, of course we wanted to continue do it in the best manner as possible too.



Peter Bradstreet
No worries, I am committed to migrating over to the new AB and I am confident that with your help and a little time, I will get there.

DecSoft

Hello Peter,

You can be sure of that! And remember that what you are learning now is HTML, CSS and Javascript, which are important not only talking about AB, but also for other possible projects, made with other possible tools, now and in the future. So don't doubt about that: it's difficult to learn, requires lot of time, hours, works, sometimes is tired, but, finally we can got it.

I am happy with AB2, because, I am developing the first app for one of our customers, and, apparently run faster in Android, and, well, tools like the app languages manager... helps a lot in order to translate the app into another languages, for example. I am happy to choose the "only Javascript" way, because, now, when we enter in an event, we know exactly what we must to do, and how to do it, and, if the stuff is not ready (no action exists, for example), we can use the right piece of code to go ahead.

Well... it's not good that I say that... but yes... I work with the tools, not only develop it, and, I am happy with the results: and honestly think that we are talking about tools that others can find interesting too: get an app running in various platforms, with the same base of code, with lot of interesting and useful stuff, because HTML, CSS and Javascript are quite powerful, and, with the help of Apache Cordova when needed... we can do lot of good things with this technologies, and with the help of DecSoft App Builder, the intention is to get it faster, in a friendly way, using a good IDE.



Samuel Vanneste
Hello David

The original poster was Peter (hence your previous reply above) ;-).

I am happy for you that you are happy with the new version. As I previously told you, I am sure you are on the right way because it is already more powerful, for sure. But please, advocate at DecSoft not to let the development where it is right now. Because I (perhaps we) miss a lot of the easyness of the previous version (ie: no more sensors, no more barcode, no more useful variables, out of the box without scouting the web for a possible plugin or sample of code, etc etc).

I am sure the staff at DecSoft was very pleased with the "new resources manager" but did the devs understood what made the real interest of the original version and the difference with any other JavaScript IDEs ? Or perhaps, you needed it urgently, reason why you were served at first ? ;-)

You can delete the post if the boss at DecSoft is unhappy, we can speak about if DecSoft needs real feedbacks. I wanted not to be rude. Sorry. Peace. <3

Peter Bradstreet
Hi David,

I have to concur with Samuel, I am not finding most things particularly intuitive and there is currently a distinct lack of equivalent samples to match the existing old AB samples which I have used extensively to learn.(including as many comments in samples as possible)

I really believe that you are on the right track and that this is the way to go. I am sure that we are just very early in the development cycle and expect some teething pains. On the downside all of our posts might be perceived by potential buyers that the new product still needs more work but on the other hand, your continued fast reaction times and very helpful responses should be percieved by potential buyers as a valid reason for working with decsoft! I am slowly dragging my way up the pure javascript learning curve thanks to a couple of Udemy courses but still a ways to go yet.

Pete

DecSoft

Hello Samuel, (now yes! :)

Various things to be considered here! First of all, we must to consider that I am the boss, the developer, and the guy who clean the office when finish. Said that, the first AB generation accumulated around four years of developments, but the new AB2 generation only some months, so, we can expect enhancements in the new generation of the IDE in the future.

Currently the new AB support all the official Cordova plugins, and, it's not clear how to do the things in the best way in order to support other plugins too, but, for sure, we want to work on that. But, said that... do you want to get a barcode scanner working? It's curious, because the first real app that I develop with AB included (requires) a barcode scanner (a QR code scanner), and, just look here... by adding the Cordova plugin ID in the app option (phonegap-plugin-barcodescanner), we can get a barcode scanned just by copy the plugin's sample code "as is", in any event:

And we can continue with other plugins... in the same way... so, we no need to wait for an "easy way" (maybe we must say here a more easy way, because the above is not difficult, I think...). Of course, said that, we want to find the right way to add other Cordova plugins, but maybe not exactly in the same way than before, so we have some doubts.

For example, certainly the HTTP client control can be good, and, even for advanced users, because can maintain the code separated, etc. However, take a look at the below code, which made an HTTP POST call and wait for the possible response, error, etc.:

So we ask us the question... it's really needed the HTTP client control? It's really needed a Barcode control? And we are not sure about... probably yes, that is, I am not talking to avoid work or something like that, but seriously thinking in what can be the best for the IDE and for our customers too.

I personally develop apps with AB from years ago and therefore see what is missing, what is good, what can be enhanced, etc. In one of my biggest app I use around 14 or 16 Cordova plugins: I can't simply wait for the IDE to be included, in the way that I expect, etc., etc. I simply use the right Javascript code and use the plugins, which is what my customer wanted: not how I do it, but what I do it...

So certainly the first AB attemping to be sold for beginners, and maybe the new AB is intended to be used for beginners too, but, also by more or less advanced users, and, this don't means that I forget the beginners... but I want that the beginners learn Javascript, since learn is always required, I see better (for us and for the beginner) to learn a powerful language, which can be used all around the world, and not some specific "actions", that can helps, of course, but that limit what we can do.

About the DecSoft App Builder vs other possible IDEs... I am not sure what to say, because, certainly I am really focused in the project... I can compare of course with the previous generation of App Builder, and, in fact, I start to write an entire article about what is new, because, as you already know, the new DecSoft App Builder has been written from the scratch, which give us lot of chances to enhance it and do the things in better ways. So yes... maybe finally someday I can prepare an article like that... but not right now, since I must clean the office right now! ;-)

What I hope, of course, is that the users (and with a better point of view previous AB users), can see the differences... AB apps compile fast, but AB2 compiles even more fast... the IDE reactions... we can see the events of a control in 1 second in AB, but we can see it in less than 1 second in AB2... In AB we play with various modal dialogs, for example, the functions managers, that force us to work in the functions... and close the dialog to continue working in other app place... in AB2 we have docks everywhere... all the managers (functions, files, resources, languages, but also the app options, the program options) are not modals... so we can simply go from one to another in a more comfortable way, etc., etc., etc.

So, if the question is, is AB2 better than AB1? The answer is yes, of course, because, in addition to other things, we apply our experience on AB when develop AB2, not only developing the IDE... but also from the point of view of an app developer who uses these IDEs too. If the question is, on the contrary, is AB better than other IDEs that we can find out there? I don't have a right answer... probably out there are very good programs that can help to develop apps, so, we trust in our work and think that our IDE is good, and we use it activelly to develop apps, but, the final user, you, the customer, have the final word, and it's good like that.

One thing to finish: DecSoft App Builder, like all the other DecSoft products, are not limited in time nor characteristics, so the users can try the product all the time he need, and with the very latest release and features. After that, he can decide if the product is useful for him and want to purchase one or more licenses, not only to revenew our current expended work, but also to support the future development of the product.

Please, Samuel, go ahead if you have any comments, etc.

P.S. Thanks for your kindly words, Peter, you are right: see this post of mine also as a possible answer / comment also to you.



Ade Wale
Hmm, so I have been missing alot of new features on AB2. Now I am worrying about my old AB projects. Peter and Samuel is the trick of converting old project to new project?

DecSoft

Hello Ade,

Hmm, so I have been missing alot of new features on AB2. Now I am worrying about my old AB projects. Peter and Samuel is the trick of converting old project to new project?

Please, don't worry at all. You can continue using AB, it's supported and well updated. AB2 is another product. There is no way to import AB projects in AB2. However, it's a similar product, so, AB users can find familiar AB2. But, again, just don't worry at all: you can continue using AB like now.



Ade Wale
Hi David, Alright, thanks.

Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.