PDA

View Full Version : MVC Architecture and "classic website" structure: should they be used toghether?



Fire-Dragon-DoL
3 Oct 2012, 7:54 AM
Hi everyone, I'm about to build a website where I require to write a lot of html + css to give it a "custom" layout.

I don't know which is the best approach if I should use it toghether with extjs. Usually I work with JQuery, which I just include and use a onReady function where I start to write scripts.

Now with extjs the thing is more interesting, I have two valid approaches: Ext.onReady (similar to jquery approach) and the MVC architecture.

I definitely prefer the second approach, however I don't know how should I create a viewport that allows me to write html without troubles (maybe I can avoid creating the viewport? Dunno).

Can you point me to the correct choice, maybe suggesting me how can I write plain html inside components (expecially a panel or similar, I need to create a webpage) without troubles and by keeping the possibility to insert components (inside the html) from extjs?

A guide/something similar is ok too.

Currently the application I've already is totally based on the MVC architecture, but I use a panel with layout: fit as viewport with some buttons inside which opens different windows.

Thanks for any good suggestion

NOTICE: This is not a request of code, just some questions about program architecture.

a.premkumar
3 Oct 2012, 9:32 PM
In my point of view, there would be no need of html if you are willing to use MVC of ExtJS. Almost everything has been provided in it. When you are using onReady, it would be naturally surrounded by html tags and scripts. When you are start work with MVC, html will not be comfortable to meddle with panels and other containers. And one more thing, you can insert html code inside panels easily but if you need to communicate to server with this code, it is going to be very painful. Using viewport is good.

Regards,
Premkumar. A

Fire-Dragon-DoL
4 Oct 2012, 4:31 AM
In my point of view, there would be no need of html if you are willing to use MVC of ExtJS. Almost everything has been provided in it. When you are using onReady, it would be naturally surrounded by html tags and scripts. When you are start work with MVC, html will not be comfortable to meddle with panels and other containers. And one more thing, you can insert html code inside panels easily but if you need to communicate to server with this code, it is going to be very painful. Using viewport is good.

Regards,
Premkumar. A

Mmmmh. Well, but achieving some website graphics with just components is much longer than doing the same with simple html + css, I'm afraid that doing it with ExtJS will require much more time than it's usually required.

Dunno, but I will try with the MVC approach 'cos I really like it.

a.premkumar
5 Oct 2012, 12:35 AM
Yeah you should try that. Initially it looks very alien but when we get used to it, everything becomes easier than we think.:) Goodluck