PDA

View Full Version : "Multi-page" web apps - best practices?



Mike Robinson
20 Sep 2009, 7:36 PM
What is the best approach for designing a large web-application which will inherently have many different "screens?"

How best to use URLs to track "where" the user is in the application ... do hot-links figure into the picture any more?

Is there a clever solution I have not thought of to the apparent fact that the browser-window ... each browser-window ... is its own, independent-of-all-others "top of the food chain?"

aconran
21 Sep 2009, 4:12 AM
Mike -

Many applications which have many different "screens" can be implemented as a Single Page Application. Ext's card layout is useful for when there are several pages which can be potentially swapped in and out of a particular area of your application.

Ext.History allows you to maintain tokens within your application which represent how to restore state. This lets you provide bookmarking type functionality as well as Back/Forward support.

Create your individual screens and windows only when users need them to minimize the time needed for application startup and to conserve memory usage.

Mike Robinson
21 Sep 2009, 6:48 AM
Is there a really-good really-complete example of these practices in an actual, mildly substantial, deployment?

mschwartz
21 Sep 2009, 6:57 AM
No offense, but the documentation on Ext.History (ext-3.0.0) is weak/thin.

There's no concrete example of how you'd use it, and the docs say this:

"History management component that allows you to register arbitrary tokens that signify application history state on navigation actions. You can then handle the history change (http://ext.bytor.pint.com/docs/output/Ext.History.html#Ext.History-change) event in order to reset your application UI to the appropriate state when the user navigates forward or backward through the browser history stack."

Yet under events it says:


Public Events

This class has no public events.

aconran
21 Sep 2009, 8:21 AM
I'm working on a complete refactor of the Feed Viewer application which illustrates usage of custom events, Ext.History and gluing together all of the components in a clean manner. Look for this for the Ext 3.1 release.

Internally we've done several large applications following these practices but unfortunately nothing that is public. Hopefully the Feed Viewer application will be large enough to show developers a good way to structure their application to minimize interdependencies while not being too large.

History docs are definitely very weak. I will post a message on the Ext 3.0 Documentation Bug thread so that we can get this addressed in a future release.

aconran
21 Sep 2009, 8:25 AM
As a followup, the events have already been added in Ext.History and will be in the documentation in the next release.
http://www.extjs.com/forum/showthread.php?p=379233&highlight=History#post379233

mschwartz
21 Sep 2009, 8:42 AM
Thanks, Aaron.

TheBerliner
21 Sep 2009, 9:25 AM
No offense, but the documentation on Ext.History (ext-3.0.0) is weak/thin.
Seems that writing the truth is regarded as offensive in the USA?!

I have been complaining about the more than weak documentation for months and this has cost 40-50% of my time needed to get into Ext JS. Therefore, "I am not amused" about that!

See my footer!

So far I had to gain the impression that the Ext team was not interested in any concrete critics and proposals. Good to read that this "weak" point has been recognized. Hoping for substantial improvements.

mschwartz
21 Sep 2009, 10:00 AM
Seems that writing the truth is regarded as offensive in the USA?!

I have been complaining about the more than weak documentation for months and this has cost 40-50% of my time needed to get into Ext JS. Therefore, "I am not amused" about that!

See my footer!

So far I had to gain the impression that the Ext team was not interested in any concrete critics and proposals. Good to read that this "weak" point has been recognized. Hoping for substantial improvements.

In the USA, we have a saying: "you attract more flies with honey than with vinegar."

Animal
21 Sep 2009, 10:14 AM
On a information unit per dollar (or Euro) basis, it seems to me that the documentation is infinitely good value.

jburnhams
21 Sep 2009, 11:58 PM
Perhaps, Mr Berliner, you could follow the example of mschwartz (http://www.extjs.com/forum/member.php?u=54609) who politely identified a specific area of the documentation that needed improvement so that it could be (and promptly was) updated by the Ext guys?

TheBerliner
22 Sep 2009, 1:09 AM
Perhaps, Mr Berliner, you could follow the example of mschwartz (http://www.extjs.com/forum/member.php?u=54609) who politely identified a specific area of the documentation that needed improvement so that it could be (and promptly was) updated by the Ext guys?
Oh, I have given many examples of where this so-called documentation is lacking substantial content, actually this is true for most parts, but I had to find out that no one in the Ext team was listening to customers. All my emails remained unanswered. Instead, they called the customer stupid and there have been very unpleasant "incidents" as reactions to my well-founded critics.

What they call a documentation is just a minimal list of methods and events but not a serious documentation.

And about "politely": I certainly was polite but in Europe this not does imply this brainwashed self-censorship that most North-Americans have been infected by. We still die and don't "pass-away", we have problems and no "issues". Language influences thoughts, rarely the other way round.

See Animal who is often very straightforward and honest and this is why many North Americans call him rude.

I know you don't like hearing this (because it's true) but this is caused by mentality and culture: North-American policy is not to bother as long as a product sells well. There is no pursuit of perfection, only greed for maximum profit. Like in cars and many other products. See Micro$hit. Just this mentality has brought the USA near bankrupcy with the IT as last resort.

danh2000
22 Sep 2009, 1:17 AM
What they call a documentation is just a minimal list of methods and events but not a serious documentation.

But the real reason why most people find it sufficient is that they have bothered to learn JavaScript; whereas you obviously haven't.

golden_wing
22 Sep 2009, 1:22 AM
to me the documentation seems to be not much different from other documentations - it's quite sufficiant

however I'd like to have some more examples in some cases since the lerning curve is quite high ;)

TheBerliner
22 Sep 2009, 1:24 AM
But the real reason why most people find it sufficient is that they have bothered to learn JavaScript; whereas you obviously haven't.
You have been claiming this over and over again but this doesn't make it true.

JS is not the problem, Ext's documentation is.

Just one example "config objects". This is not a standard JavasScript term. I did not find it anywhere in the JS tutorials etc. It was defined by Ext JS but it's not explained anywhere.

A glossary is a minimal requirement for a documentation. And this was just one example.

danh2000
22 Sep 2009, 1:29 AM
You have been claiming this over and over again but this doesn't make it true.

JS is not the problem, Ext's documentation is.

Just one example "config objects". This is not a standard JavasScript term. I did not find it anywhere in the JS tutorials etc. It was defined by Ext JS but it's not explained anywhere.

A glossary is a minimal requirement for a documentation. And this was just one example.

I remember the exact example of config objects that you refer to and I remember that you didn't understand the syntax for an object literal.

I also remember you not understanding multiple var statements separated by comma's, you thought it was some voodoo struct that the developers had hidden from you by not documenting it.

You may think that you have sufficient knowledge of JavaScript, but I think otherwise.

danh2000
22 Sep 2009, 1:34 AM
..... to be honest though, you are not alone in this respect, the difference is your attitude - even after making basic mistakes and really needing help; you seem incapable of accepting it, instead you "throw your toys out of the pram" like a toddler who doesn't know how to play the game and blame everyone and everything except yourself.

TheBerliner
22 Sep 2009, 1:35 AM
Just one more example:

MVC is generally regarded as the most "up-to-date" paradigm in o-o and/or complex systems. Certainly many Ext users come from o-o environments.

I found not a single word about how to bind Ext interfaces to model instances, which is an essential subject in designing and implementing any data-heavy app in Ext.

In fact, the tutorials all seem to have been written by volonteers (sure, that's cheaper, more profits) and not as part of a systematic documentation and explanation of how to use a complex system.

Once more for the blind: I am not criticising the product, which to me seems brilliant athough I cannot compare with others. I am only but heavily criticising that it comes virually naked.

TheBerliner
22 Sep 2009, 1:39 AM
..... to be honest though, you are not alone in this respect, the difference is your attitude - even after making basic mistakes and really needing help; you seem incapable of accepting it, instead you "throw your toys out of the pram" like a toddler who doesn't know how to play the game and blame everyone and everything except yourself.
I understand that it's unpleasant reading uncomfortable truth. This is always the moment, in forums just as in politics, when personal allegations have to replace arguments.

BTW: I came along quite well in most subjects. Just took much longer. I even fixed the many bugs in the CSVReader class that I downloaded from the forum. But I just won't shut-up about what there is to criticise.

jburnhams
22 Sep 2009, 1:46 AM
Oh, I have given many examples of where this so-called documentation is lacking substantial content, actually this is true for most parts, but I had to find out that no one in the Ext team was listening to customers. All my emails remained unanswered. Instead, they called the customer stupid and there have been very unpleasant "incidents" as reactions to my well-founded critics.
You shouldn't email Ext about docs issues - there's a sticky (http://www.extjs.com/forum/showthread.php?t=65644) in the bugs forum specifically for the purpose of improving and fixing errors in the documentation. Have you posted any of your many examples in that thread?

danh2000
22 Sep 2009, 1:46 AM
I understand that it's unpleasant reading uncomfortable truth.
...


I couldn't agree more - and I do wish you'd learn the basics of JavaScript.

TheBerliner
22 Sep 2009, 1:50 AM
I couldn't agree more - and I do wish you'd learn the basics of JavaScript.
Oh boy, seems you don't want to understand: I started in April/May and it really does not take months to learn JS despite its obscurities.

TheBerliner
22 Sep 2009, 1:52 AM
You shouldn't email Ext about docs issues - there's a sticky (http://www.extjs.com/forum/showthread.php?t=65644) in the bugs forum specifically for the purpose of improving and fixing errors in the documentation. Have you posted any of your many examples in that thread?
Well, my emails were general complaints about the state of the "documentation".

But since I received not even any answer, only the mentioned allegations in the forum, I gave up making my notes.

danh2000
22 Sep 2009, 2:52 AM
From TheBerliner via PM:


Hello,

I try to avoid any personal discussions in a forum, but I have to make this remark regarding your last personal posting:

If you don't even know the principles of MVC (consider widgets to be models, what a joke), you should better be quiet and not blame others when learning an undocumented and quite complex library.

MVC has been basic knowledge of software architecture for years.

With best regards

So in every post (whether started by you or not), you blame Ext's developers and documentation for being sloppy and when I point out that your lack of understanding of basic JavaScript has been the problem, you summize that I don't know the MVC pattern.

How on earth did you write that with a straight face?

And for the record, I have never once referred to a widget as a Model. Why on earth do you think I'm confused between Views and Models because I point out your stupid mistakes?

TheBerliner
22 Sep 2009, 3:16 AM
From TheBerliner via PM:
You are publishing a personal message sent to you by me without my consent!

There is no doubt that this is generally regarded as highly incorrect.

My aim in sending this as a PM was to dicreetly avoiding the shame being made public that you, although so loud, proud and self-condidently telling others how stupid they are, that you did not even know the MVC paradigm. You did not understand my precise and detailed question in another thread how to implement somthing near MVC in Ext, how to bind widgets to model instances and you proved this by asking what the models were and if the widgets were the model. Ridiculous. You named them "observables", thus the super class of most components, views, forms etc.

So you cannot even distinguish between views and models but you are telling others "to learn JS first". Very clever!

All your aim in these discussions is in personal allegations, not in the subject, and this fits well into committing this sin of netiquette. Because of this, I will not waste any more time on discussions with you and put you as the first on my ignore list.

danh2000
22 Sep 2009, 3:24 AM
I asked if your models were Records or subclasses of Observable - neither of which can be considered widgets.

A widget is an element of a GUI - it's part of the interface.

Both Record and Observable subclass JavaScript's native Object - they are lightweight and ideal for encapsulating domain data.

In MVC, M stands for model - models encapsulate domain data.

Lesson over - I will not waste my time educating you further.

golden_wing
22 Sep 2009, 3:24 AM
I believe that he was just asking in order to figure out whether you see it yourself as a model. one tries to think about what mistakes the other one could have in his thinking ;)

jburnhams
22 Sep 2009, 3:33 AM
Well, my emails were general complaints about the state of the "documentation".

But since I received not even any answer, only the mentioned allegations in the forum, I gave up making my notes.
Perhaps you could try again then, by adding specific suggestions to the documentation thread in the bugs forum, and helping Ext to improve the documentation?

Someone of your considerable experience and knowledge (especially in the ways of OO) can probably identify those individual areas of the documentation that are incorrect or could be improved better than I can. The ways and terminology of smalltalk may have a lot to teach us.

TheBerliner
22 Sep 2009, 3:33 AM
I believe that he was just asking in order to figure out whether you see it yourself as a model. one tries to think about what mistakes the other one could have in his thinking ;)
Well, you see the good in people, that's fine, and so do I - although knowing that we shall be proven wrong far too often.

Just read the other thread where I explained clearly what I meant with "model" (although this really needs not explanation except to novices). The answer I received from danh200 was "So you don't want help then!". My asking to please explain why he got this false impression remained unanswered.

TheBerliner
22 Sep 2009, 3:39 AM
The ways and terminology of smalltalk may have a lot to teach us.
Thank you very much for stating this truth! After all, Smalltalk has been the blueprint for almost all that came afterwards including Java and the forgotten heros like Ada, Eiffel, Modula etc.

(Just for the blind: I did not invent Smalltalk, I am just obsessed from it's brilliance, comfort and superiority.)

However, a good documentation has nothing to do with a particular language or product. And I would have done that if I had seen any chance to be taken seriously but I don't waste my time shouting in vain onto this wall of Ext people who are not interested in what their customers tell them.

Mike Robinson
23 Sep 2009, 11:18 AM
Children, children ... you are in public.

"Take it off-line."