Even great frameworks like Jquery will not help you because they were not meant for it, and it is not their job to solve the problems that you will face.
Let’s for a moment think about GMAIL(one of my favorite web applications) and think about architecture that we would use if we are up to building it in the first place.
No doubt for this venture is primarily necessary to have a good framework or set of frameworks, but even a best framework can not prevent you from writing unmaintainable code.
So let’s get back to the GMAIL, what would you do.
Divide and conquer.
Start from a big picture, from top to bottom and try not to focus on some technical details from the very beginning.
Instead, try to isolate and design specific parts of page as standalone modules.
That communication between them should not be a direct one, because modules should not know about each other, and I will now list the very known reasons for that:
Modules are isolated pieces of code that when well designed, work independently of other modules and therefore can be removed and added as necessary.
Because the application functionality is divided into these modules, team can easily split work.
Each developer on a team can be assigned a set of modules to develop and can work in parallel with minimal conflicts. Additionally, everyone can write in their own preferred style within the context of the pattern without preferences getting in the way of progress.
Another advantage of its isolation and containment is that you can inject it on demand without worrying about its impact on other modules.
There are many frameworks that can help you accomplish this principles and set of guidelines and I will add here a list of frameworks which helped me with this.
- jquery ui js and css -
- twitter bootstrap js and css
Everything I’ve said so far is well known, but I had to mention it since due to this way of thinking I am able to build much more complex web applications in easier way, and I am loving it.
There are no frameworks for big or small projects, they all solve just some set of problems you will face, but not all of them. You have to change old habits and try to think in new ways.
Try and see what is the best framework combination for you and your team.
Let me use my remaining text space to quote some very smart people.
“The secret to building large apps is never build large apps. Break your applications into small pieces. Then, assemble those testable, bite-sized pieces into your big application” -
“The more tied components are to each other, the less reusable they will be, and the more difficult it becomes to make changes to one without accidentally affecting another” -
Rebecca Murphey, author of jQuery Fundamentals.