Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows Desktop Apps
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01635157
Message ID:
01635463
Vues:
78
Writing 6 lines of code to use an event (as in Vue JS) just isn't my cup of tea --
and that doesn't include the code that the event fires.
It's too big a stretch for my feeble mind to go from there up to UI and data event metadata
defined in a UI data event metadata management tool. VFP took care of the plumbing and the
wiring so we could focus on what needed to be done, instead of having to focus on what
needs to be done before we do what comes before what really needs to be done.

Oh come on Hank I've seen what you can do in code! Yes there are environments that appear to hide the setup of the code handling for events - but it's nothing more that syntax sugar. Even in Fox if you wanted some sort special handling you had to write the code some where. All Fox did was provide tools/methods to handle the normal events. But so does javascript.

Take jQuery.

jQuery('#input').on('blur', function() { var inputValue = $(this).val();});

#input = the id of the object
.on = the event
blur = the action
and the function sets a value
All on one line of code.
using Vue
""input type='text' v-on='blur':"onBlur in your html file"""
methods: {onBlur: function() {dosomething} } in your javascript file.


That was two lines of code - but it separated the locations. Kind of a separation of duties in my mind.

So understanding Vue's event system is really not the big deal that you make sound like.

Now a point that I do agree with you is the ease of use. What a pain it was to me that the syntax sugar was missing from almost any other language I reviewed. But I quickly realized the fact is was missing provided more control. I didn't have to limit myself in anyway when it came to events (I also realized that I could do the same in Fox but without the sugar).

The true issue for me has always been data binding to controls. I did not want to give it up in anyway. When I started out with Python's many different GUI lib's I quickly realized that simple data binding was missing. I was very disappointed that it was missing. But then I found Dabo which made binding easy and all on one line. "dabo.ui.dTextBox(parent, Datasource = sometable, DataField= somefield, Value=somevalue)" Now if I could find that in a javascript lib I'd have to truly consider using it. But I haven't seen anything like it so far. Yes I know many of the frameworks talk about two way binding - but it's really does not handle the data like fox or Dabo does.

Most of these javascript frameworks limit the way you look a CRUD apps. You have to setup events and change the way you think about handling data. This is very disappointing. If there were a small framework that was designed around database interaction and providing screen controls to match I used it.

Johnf
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform