View Full Version : Sencha Touch Best patterns and practices
15 Sep 2010, 8:50 PM
Can you please share the document that describes as to the patterns and best practices while developing apps using sencha framework
17 Sep 2010, 4:55 AM
I'm interesting too.
19 Sep 2010, 10:59 AM
Hi ! and up
19 Sep 2010, 11:05 AM
Have you guys found the same anywhere? If yes, then can you pls share the links
19 Sep 2010, 7:21 PM
Perhaps you might want to elaborate. It's easy to say "what are the best practices", but what, specifically are you referring to?
20 Sep 2010, 11:54 PM
For exemple, I need to make a website with a login for users, and then the website contain a menu with several links to others pages.
And I have trouble to make the architecture : if I must code all the website in the index.js or if I must create one file per pages and how I can make the connexion with theses pages. I already look long time kitchensink but I'm lost.
(sorry for my english, I'm french)
21 Sep 2010, 12:48 PM
This is a pretty fair question.
Sencha produces several libraries designed to implement large-scale enterprise applications. These applications often consist of discrete areas of functionality, or features. Any mature project team will want to modularize the code used to develop such an application. Often, frameworks support patterns like MVC to facilitate this.
Many other frameworks (Struts, Spring, etc.) provide more complete transactional sample applications, which demonstrate the best and typical practices fror using the framework. I don't see anything like this for Sencha Touch. I believe this is what the original poster was asking for. For example, how can multiple .js application files be used, similar to modules in GWT? How can/should a complex application be structured?
I am interested in this information as well.
In addition, I am starting an enterprise project to develop a product which will be deployed to mobile devices and as a desktop web application. I'm also interested in best practices or strategies for developing a single application that can be deployed to these targets. It looks like Sencha Touch is based on Ext-JS, so I'm wondering if there is a strategy for using Ext-JS for a desktop targeted web app and Touch for the same app targeted to mobile devices, and using common application files. For example, using the same Layout components, with attributes dynamically set based on some user-agent detection.
Is there anything that Sencha can provide to help developers get started along these lines?
I got the similar problem with sencha Touch. I want to a form for login but the "buttons" which I have added are not working.
28 Sep 2010, 1:26 AM
28 Sep 2010, 1:31 AM
All of the same principles apply. Of course when you read it you'll see that most of it is just good common sense OO design.
28 Sep 2010, 2:45 AM
Nice reading... quiet long but looks interesting.
Does the same principle applies to Ext Touch ? I mean for examples :
Do we choose decide to use specific window/view design (extend - Pre-configured classes) if we only use this kind of view once ?
How to optimize the loading of an app ? does the splitting in multiple files corresponding to different files is something good ? or something wrong ?
For examples it looks faster to load only one big CSS packed rather than loading 4/5 separate packed CSS.
Equally is it better to pack all the preconfigured class in one JS and use a inline + pack version of this file or should we decide to let our files in spliced version. Meaning that if we have 6 kind of view we get 6 preconfigured class and 6 files + the instance of this files.
One more question, how to build a separate version of Ext-touch packing only the necessary function, same thing for CSS ?
Thank you a lot for all this information and reading, it is always interesting.
28 Sep 2010, 4:17 AM
you have concrete examples of complex applications ?
28 Sep 2010, 4:47 AM
Hi Guys, after my own experience with ExtJS itself and as Evan pointed in his link... patterns are discovered based on experienced and needs... and MVC is the well known standard..., so, in my application, which is let's say medium/big size... i have
1) Models: Here i have all classes using the Model concept of Sencha... and my own models... together with some wrappers around some model objects.. also Storage classes with some Storage Managers as well... just the way Beans are to the server side...
2) Views: Here i have all my custom panels, menus, views, boxes... based on sencha components.
3) Controllers: this as you may know...the "spaguetti" mixer... the one connecting the models to the views.... and talking to the services..
4) Services: Here i have all the classes asking things to the server... (ajax stuff)...
Therefore,... i think if you have experience as software developer in other areas you will able to figure out the best way to split your code...
28 Sep 2010, 12:38 PM
Could we see a simple example of a Controller, Service, View integration ?
Powered by vBulletin® Version 4.1.5 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.