H
H
HaruAtari2013-12-02 18:58:03
JavaScript
HaruAtari, 2013-12-02 18:58:03

Organization of javascript code

Good day.
By specialization, I am engaged in writing the server side of sites (sometimes applications). But I came across a project in which I write both the server and client parts (I also torment the layout). The server side is organized remarkably: full MVC, thick models, several layers of abstraction and everything is covered with tests. But I have a problem with the client side. With javascript, I worked quite a bit and now there is a problem with the organization of the code.
Almost all the projects that I wrote before were with the rest architecture and I didn’t have to worry much on the server: I gave the desired object in json format and was satisfied. And now you have to think about performances. At the moment, everything is assembled on the server and the client is given ready-made html, and there the scripts are engaged only in visual effects, although there are also complex sections.
Actually the site is a directory. Each user can view and filter the list of applications, leave feedback on the application. Also, users have the opportunity to create albums and upload photos of works to them. Plus a system of reviews and a complex system of distribution of rights. The abundance of pop-ups, etc. A lot more is planned in the future. The site is partly powered by ajax (forms, uploading photos), partly by regular requests.
Before it's too late I want to fix the architecture. What would then not be excruciatingly painful. For now, views are a quiet horror, and scripts are noodles from calls and listeners.
I'm thinking of organizing this as a single page application in chaplinjs (I love coffee). Tell me, is it worth bothering with a one-pager for a system of this scale? Or are there other options?
Actually, I need modularity, AMD, client-side view template engine, IE8+, low entry threshold so that I can translate the existing part of the code without much time.
I would be very grateful for any thoughts. All the same, server and client architectures are very different, I'm confused :-).

Answer the question

In order to leave comments, you need to log in

4 answer(s)
B
bo883, 2013-12-06
@bo883

Backbonejs+underscorejs+requirejs=Happiness
Chaplinjs=Happiness PS
: Knowledge of js is required.

G
g27, 2013-12-02
@g27

https://github.com/sirprize/dojomat

S
sergealmazov, 2013-12-04
@sergealmazov

Take already ExtJS. Once you figure it out and the architecture will be all right.

T
tamtakoe, 2013-12-08
@tamtakoe

https://github.com/tamtakoe/oi.file Server cropped photo manager. Add to the $preview method the code that should be cropped, there will be cropping on the client

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question