Architecture for modern web applications

This is for discussion, mainly on 1.x but there's some 2.x topics here too.

Moderators: dwhittle, Ian

Architecture for modern web applications

Postby dainsanity » Tue Jul 12, 2011 12:40 pm

Hey folks,

I have a general question regarding the architecture for modern web applications and where symfony can be used in this architecture? I would like to develop a web application in the area of crowdfunding. So beside the frontend interactions with the user there are a lot of backend actions like mailing and money-transfering etc.

In my opinion symfony should/could be used in the frontend of a web application but how I can prevent of writing similar queries/actions in different applications (frontend/backend) for example. Or am I totally wrong and it is much easier as I thought? E.g. using different symfony apps for frontend and backend?

I heard that Facebook's frontend for example is using the same public API as all the other web applications with Facebook support. So I think they are using a backend with a high level programming language like Java or so and the frontend is PHP with an self-created framework.

I would like to hear your comments on this topic.

Brgds

dainsanity
dainsanity
Junior Member
 
Posts: 4
Joined: Wed Apr 28, 2010 12:37 pm

Re: Architecture for modern web applications

Postby halfer » Sat Jul 16, 2011 4:44 pm

As far as I know, Facebook use PHP for pretty much all their front end; I should think background processes use something else though.

However I'd say if you are developing a web app, think really small and quick to start with. A good question is "what is the minimum I need to do to make a viable prototype"? Be really strict with this, so you can then create the first (alpha?) version in a few weeks or a couple of months rather than a year! You can then let your customers guide you as to what they most need after that.

To share stuff between different sections of the system, use static libraries. I tend to have a MyProjectUtils.class.php in my application's lib/ folder, and in that goes a bunch of static methods in the form MyProjectUtils::myHandyThing(). It's very clean and of course can be split further if you have a lot of shared functions. Quite a lot of shared stuff will go in your models anyway, which are already available to all applications.

The frontend/backend application division in symfony 1.x is one approach, however I prefer putting everything in one application (i.e. user screens and admin screens). This means that the admin screens can be subject to the same set of access restrictions as defined for your frontend screens (i.e. they can require an 'admin' role or whatever). I found splitting things up more hassle than it was worth, tbh - though it is conceivably useful if you want to set up IP address restrictions etc.
halfer
Faithful Member
 
Posts: 10146
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK


Return to General discussion

Who is online

Users browsing this forum: Bing [Bot], psaid and 4 guests