Author Topic: Application Architecture...  (Read 318 times)

Brad

  • Lurker
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1512
    • View Profile
    • Brads Blawg
Application Architecture...
« on: January 28, 2012, 10:12:05 AM »
Hi All,

I've recently landed a job with a software house as their in house web developer.. Their old guy left with 10 odd projects that needed starting. Although creating web applications is nothing new to me, I was wondering if you guys have any architectural designs you like to follow,  IE how you separate your front end from back end or general directory structure etc..

I plan to use Smarty as the templating engine as this is what the majority of my new team are used to, but have no idea the best way to layout my applications - all the historic ones I've done are incredibly messy :'(

Cheers!
Regards, Brad

Masturbation. Taking matters into your own hands.

I er, finally have a website

rvtraveller

  • The very scary
  • Administrator
  • Hero Member
  • *****
  • Posts: 1187
    • View Profile
Re: Application Architecture...
« Reply #1 on: January 28, 2012, 11:17:54 AM »
I can't speak for everyone, but I tend to separate things like images, javascript, CSS, etc in to different folders.  Then make some sort of "include" folder.  The crux of this "include" folder are 2 files, normally called commonFunctions and databaseFunctions.  As you can imagine, anything that involves a transaction with the database goes in the databaseFunctions file and anything else (such as email processing and such) goes in the commonFunctions file.  If I have to build an admin panel with it as well, I put everything it needs in a separate directory so it is completely independent of any other files.

Perhaps the most important methodology I use though, is a white board.  Not just 1 white board, lots of them.  Every application I write is documented fully on white boards.  File layout, function layout, how the application flows, future thinking ideas, even some base pseudo-code is written on these white boards.  Once the website moves out of "construction" phase and is live, everything on the white boards gets photographed (I use a Nikon D5000 but you can use whatever you have to take high resolution pics) and digitized for future reference.  That way, anyone on the team can reference them at any time.  When an application comes up for a rewrite, everything that was written on the white boards either gets rewritten back on them, or are printed on poster printers and taped to the walls above the white board.

Brad

  • Lurker
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1512
    • View Profile
    • Brads Blawg
Re: Application Architecture...
« Reply #2 on: January 29, 2012, 07:12:41 PM »
I totally agree with the whiteboard, my new office has a wall that is just a whiteboard.. By far the most useful wall ever built

Have you had any experiences with MVC archs? An old colleague suggested this to me but I've ever really looked into it. The guys over at StackExchange seem to love it too although I'm skeptical..
Regards, Brad

Masturbation. Taking matters into your own hands.

I er, finally have a website

cms07

  • Full Member
  • ***
  • Posts: 115
    • View Profile
    • Blog
Re: Application Architecture...
« Reply #3 on: January 29, 2012, 09:41:09 PM »
I totally agree with the whiteboard, my new office has a wall that is just a whiteboard.. By far the most useful wall ever built
Why take a picture of it (if you do it like rvtraveller)? That seems like a lot of disk space.
Intel Core 2 Duo CPU T5470 @ 1.60GHz
KDE 4 on Arch Linux.

rvtraveller

  • The very scary
  • Administrator
  • Hero Member
  • *****
  • Posts: 1187
    • View Profile
Re: Application Architecture...
« Reply #4 on: January 29, 2012, 11:45:16 PM »
I totally agree with the whiteboard, my new office has a wall that is just a whiteboard.. By far the most useful wall ever built
Why take a picture of it (if you do it like rvtraveller)? That seems like a lot of disk space.

I take pictures of it because I need the whiteboards for other projects.  It is more feasible to store thousands of pictures on a hard drive, than thousands of white boards.  :)

Have you had any experiences with MVC archs? An old colleague suggested this to me but I've ever really looked into it. The guys over at StackExchange seem to love it too although I'm skeptical..

I've written some Ruby on Rails before which is MVC based and every now and then I come upon a maintenance project on a PHP website that is MVC based.  Personally, it isn't how I like to code PHP that way because it wasn't how I first learned to code PHP.  However, when I was using it with Ruby on Rails I enjoyed the separation it provided and I code that way when using Ruby on Rails because it is how I first learned.

In the end, it is all what you feel comfortable with.  The best architecture system is one that is easy to maintain, if that means using an MVC architecture then go for it, if that means really good documentation without a MVC architecture then that works too.

Pinako

  • Hero Member
  • *****
  • Posts: 1263
    • View Profile
    • inportb
Re: Application Architecture...
« Reply #5 on: January 29, 2012, 11:59:17 PM »
I totally agree with the whiteboard, my new office has a wall that is just a whiteboard.. By far the most useful wall ever built
Why take a picture of it (if you do it like rvtraveller)? That seems like a lot of disk space.

Disk space is cheaper than wall space.

cms07

  • Full Member
  • ***
  • Posts: 115
    • View Profile
    • Blog
Re: Application Architecture...
« Reply #6 on: January 30, 2012, 07:49:27 PM »
I really meant why not type them or something?
Intel Core 2 Duo CPU T5470 @ 1.60GHz
KDE 4 on Arch Linux.

rvtraveller

  • The very scary
  • Administrator
  • Hero Member
  • *****
  • Posts: 1187
    • View Profile
Re: Application Architecture...
« Reply #7 on: January 30, 2012, 11:37:04 PM »
I really meant why not type them or something?

I take pictures, because it easily captures exactly what was laid out.  Sure, typing them is an option.  However, often times my whiteboards contain not only text but also flow diagrams and rough design sketches of how pages are to be laid out.  Sure, those details could also be replicated digitally.  In the end, it all comes down to what is the most efficient use of time and resources.  I could put all the details on the computer to begin with using something like OneNote to handle both text and drawing, but then that limits it to just me being able to view those notes.  But RVTraveller, why can't you use a projector and put them up on a big screen for all to see?  Answer:  I can't draw on presentation screens.

Remember, we aren't just talking about 1 person referencing notes like you might be for your personal website.  These notes might be viewed by 50+ people over the course of a project and this has been the most feasible way I have found to do this.  This same technique is used by companies around the world (such as Cisco, Treyarch Studios, Disney, and hundreds of other technical companies).

I will say, I have contemplated getting white boards that hook up to the computer and capture what you write as you write it, but I just haven't been convinced that this is the best route to go (not to mention, expensive).

Brad

  • Lurker
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1512
    • View Profile
    • Brads Blawg
Re: Application Architecture...
« Reply #8 on: February 02, 2012, 01:00:46 PM »
I will say, I have contemplated getting white boards that hook up to the computer and capture what you write as you write it, but I just haven't been convinced that this is the best route to go (not to mention, expensive).

I worked in the Education sector for a while, and our interactive whiteboards cost us around £600 or a 3FT one, (sorry no USD!).. and these aren't as easy and quick to use as a good old office whiteboard!


And I quite like the MVC model, although I think it has some habit curves I need to get used to, but it definitely seems like a good model to use. I think its well worthwhile creating your own Framework however.. You could use one like CakePHP but I think the flexibility you have with using your own framework is the best route!
Regards, Brad

Masturbation. Taking matters into your own hands.

I er, finally have a website