Jump to content

I don 't quite understand this


G+_Christophe Vandingelen
 Share

Recommended Posts

+christophe vandingelen,

 

 For lack of better words (that I really do not care to learn), when you code up the "Form" (where you make the text boxes and buttons), you are coding in XAML (a fancy XML file coupled with a sluggish and clunky runtime viewer). You make "events" (such as a button click) and hook them to code (perhaps some C# code, but it could be any supported language). There are all sorts of fancy and confusing terms describing the view and the model of the code flow, all seemingly borrowed from a more successful vendor named after a fruit, and colored in a similar shade of cocoa.

 

They can call the views whatever they want, but it is still a flavor of "Event Driven" programming. You click (an event), some code is triggered, and eventually, the code returns. Add in the steep curve required for dealing with threaded code (multitasking), and blacklisted system functions and you have it all in a nutshell.

 

From the 30,000 foot view, the whole Visual Studio thing is a hard to swallow re-implementation of the very popular (and well written) "Delphi" language/IDE, hampered with with concepts added for Windows RT. And no wonder it it is so similar... It was composed by the very same guy who wrote Delhi (Anders Hejlsberg - my old buddy who still owes me a Danish Flag - but that's another story).

 

A Delphi clone is probably what Bill Gates wanted on that stormy day he pulled up to the Borland Campus in a Limo (what, no Ford Taurus???) to take Anders away. In the two decades since, not much has really changed (languageg wise), except for the reams of fancy new terms that have been added by the marketing departments to apply to mostly the same old concepts.

 

Try not to let all the "Model-View-Thingy" marketing terms and the poorly implemented IDE confuse you. It's still a a form composer that lets you paint up the UI with buttons (and the like), perhaps a few "properties" (such as button colors and the like), and a way to hook up code to some of the predefined events (such as the clickly events and the like). Nothing more, nothing less, and nothing really new.

 

I might suggest you take a look at Delphi/CBuilder. It is a huge installation these days, but (I think) it is free for personal use. It is still "the real deal", and super easy to learn the same concepts (a child can do it). It is very (very) fast, and your code will run on Windows, OSX, iOS and Android. While learning Delphi/CBuilder will probably not get you any points in the certification department, and you may loose the respect of your programming peers, you will pick up the concepts super fast, and that is what really counts.

 

It has been almost 20 years since Anders left the Borland campus and started work on C#, yet the Delphi/CBuilder RAD Studio IDE that he fathered is still the golden benchmark for what everyone else in the compiler business (including himself) tries to achieve. It is worth a look.

 

Speaking of achieving (and Delphi), one of my old cubicle buddies just leased the massive Borland campus in Scotts Valley, swimming pools, and all!

 

TJoe.

Link to comment
Share on other sites

Read the msdn info and I think I get it now, I give another expample: The view is the button witch is clicked, the viewmodel checks if the data is correct (for example: check for correct e-mail format) and if it is that way it tells the model to update the info. The model updates and sends a updated/failed signal the de modelview whitch gives it to view that displays this info to the user.

Link to comment
Share on other sites

christophe vandingelen The idea is that the View would use the powerful data binding capabilities of WPF to bind to properties on the ViewModel. That means your TextBox would be bound to a property like First_Name on the ViewModel.  The binding can be one-way or two-way. Also any button clicks or menu selections would trigger methods on the ViewModel.  The View would have as little code in it as possible.  The ViewModel could handle data validation if your Model doesn't do that, for example if you need to use an existing Model that you don't have the source code for.  It looks like the ViewModel also can adapt the data coming from the Model if it needs to be displayed in different form than the Model provides it. 

Link to comment
Share on other sites

Having read the msdn article Daniel posted, and having used Delphi since Delphi 1, I agree 100% with Joe Hecht. MVVM is a complicated beast that does in a more complicated fashion what I do in Delphi with a few non-visual components that tie data to UI elements just by setting some properties of the components and writing a few event handlers. MVVM-style systems can be a good way of handling complex situations - I have an order creation class that I call from a number of different programs - but is overkill for simpler programs unless you need a layer of abstraction to connect to different kinds of back-end databases or something.

Link to comment
Share on other sites

I have been told I am partial to Delphi (having been on the team), but I use just about every tool under the sun, on just about every platform there is (on a daily basis). At the end of the day, I almost always pick up some version of Delphi or CBuilder whenever

possible, simply because it is usually the fastest way to get a professional job done. Plus it is way way easy.

 

Even my wife codes a bit in Delphi. When I showed her the model chart, she totally freaked. When I explained it, she said "all that to show how to code up simple event? That's messed up, it is not 101, and that's why I stay away".

 

Throwing concepts like that model view chart, into the lap of a new programmer that just trying to get a button to do something, is so wrong, (on so many levels).

 

Correct me if I am wrong, but I thought the plan was to gently introduce programming to new folks and encourage them to pick it up, not to baffle them and scare them away.

 

I keep hearing about what "Coding 101" is (and what it is not) supposed to be about, and to me, all the different stories told so far seem misguided and mostly mutually exclusive. I still remember the good Padre saying he was going to cover assembly language in the first few episodes (Ewww). Did he not follow his plan? Was there ever a plan?

 

Thirty-x episodes seem to have covered a wide variety of confusion. While there are some fans here, most of the folks leave about as fast as they arrive.

 

Instead of bragging about the "thousand plus" folks here in the community, I would rather here about the "half dozen" who actually post something. In all honesty, this place should be hopping with activity, yet I see more posts from places with less than one percent of the population. That number we hear is nothing but hot air.

 

Hearing Padre brag about the huge community here simply makes me doubt anything the guy says has any real meaning.

 

He should be asking people not to join, but to STAY.

 

As I have said all along, perhaps there is room for improvement. 

 

I see a couple of guys working it here, with (the other) Joe deserving the real credit of carrying the ball (great job by the way). Padre and Shannon have been M.I.A since episode 3, and this community has turned into nothing more than a very small piece of the massive volunteer TWiT army (that if TWiT paid taxes on the actual value received it would probably go bankrupt).

 

I will say it again, our time here is better spent elsewhere, as our true benefit is going to Lynda.com. Perhaps it is time to stop the madness, and simply not encourage it any further.

 

Folks can abstract that into any sort of model view they want, as this rant is simply an event driven model :)

 

Place it in a Try{}Except{} Block.

 

TJoe

Link to comment
Share on other sites

 Share

×
×
  • Create New...