No Spaghetti Please: Frameworks Are Critical!

The goal of  this post is to educate clients — those who need us.  The crux of the article,  it is important how your developer approaches a web project no matter the size of the website.  The last thing you want is a spaghetti site.

From a static site to a blog and  e-commerce site to a large content managed web site, there are many solutions and approaches for web development.  For the purposes of the article, it does not matter what a web developer is using to frame your site, just that they are using something.

To make this easy, just ask this question to a potential web developer, “What type of framework do you use to build a site like mine?”  Here are some good answers:

  • Small static site answer :  “Your site is small enough (less than 8 pages) that HTML, CSS, JavaScript and perhaps some AJAX will be fine”.  This is a good answer.  Do not worry about the technology acronyms, because there are a myriad of approaches.  The above represents the most basic approach.
  • Medium to large site answer :  “For sites you size we use X”  X, could be WordPress, Drupal, Expression Engine, FarCry etc.  The goal here is to hear a solution (I.e., a larger community based or commercial solution) that allows you to maintain the content of the website in a controlled environment.
  • Blog site answer:   ” We use WordPress, Expression Engine, Mango or a like blog.”  Great because about a bazillion other people use these tools too! More on this in a future post.  Not all WordPress site are created equal.
  • E-commerce  or CMS site answer: “We use X platform” X being an application where the developer can give a URL to check it out before you opt to build on it.

Here is the important part, if  the web developer  says:

  • We roll our own solution
  • We have a custom proprietary system
  • What is a framework?

In most cases, Keep looking!

Professional web developers know about both community and commercial solutions in the marketplace to build robust sites.  These solutions come with application-author/developer support, community support and, of course, the support of your web developer.  Not using a  more broadly community supported application means you are the mercy of your web developer with code that probably did not go through enough testing for primetime.
When Four Eyes started in 1998 there was not much going on in the area of web frameworks.  Back in the day, advanced data driven sites – and I use the term loosely – were PERL based applications utilizing flat-files (big delimited text files).  To say these applications were clumsy, poorly coded and clunky  is being nice.  But this is what we had.  Eventually, languages like PHP, ASP, JSP and Coldfusion started to gain momentum along with databases MySQL, MSSQL and Postgres. This changed everything.

With these new languages came all types of coding styles, all of which can be classified as spaghetti code.  Spaghetti code is when HTML (design) and application logic (programmatic code) are mixed on one page.  With no clear separation of application logic and design, developers quickly found themselves in patterns of duplicating code and having to maintain web pages where changing one page could have catastrophic effects to the rest of the web site. Essentially, the framework was cut-n-paste and little to no code re-use.

As frameworks such as Fusebox, ModelGlue, Struts, etc. came around —  Four Eyes even made one called PatchBay — a system of development more closely tied to object oriented (OO) programming patterns like in desktop applications became clear.  The goal of all these approaches, separate application logic from design.  The grander picture became an OO approach to web development known as Model View Controller (MVC).

  • Model:  The underlying logic/structure of data in the application and the high-level class associated with it. This object model does not contain any information about the user interface.
  • View: A collection of classes representing the elements in the user interface (E.g., a web site)
  • Controller:  The classes/code connecting the model and the view, and is used to communicate between classes in the model and view.

Four Eyes, like so many other web shops,  quickly adapted this new approach to build websites.   When implemented properly, gone were the days of hand coding administrative interfaces, writing clunky javascript to validate data, writing and rewriting queries.  Combined with ORM (Object Relational Management), it did not even matter what database we used — the solutions could  handle it all.

Granted, the above is an abbreviated overview and frankly,  just because we have all these frameworks does not mean web developers are using them.  Relying on spaghetti code is easy and fast — well kinda.  It easy and fast to just write some code and slap it on a page to perform a function.  However, when this development style is applied to larger sites, the result can be sites that take longer to complete and complicated to maintain.

The framework is a wonderful tool that is worth a developers time to learn and embrace.  Ultimately, frameworks mean that we were spending less time writing and duplicating basic  features and spending that time creating code that provides our clients with easy to use websites.  Frameworks mean:

  • More efficient  development of a web site — developers are using the correct tools to build a website efficiently and more scalable.
  • Easier to update and upgrade a website in the future.  Adding new features is just easier with a proper framework.
  • Less bugs to fix

Overall, remember you do not want to pay your developer to just develop your site, you want to pay them for their ability to build your site correctly and efficiently.

SOME OF YOU EVEN KNOW A FRAMEWORK OR  TWO

So what is a framework that you may know?  WordPress.  Yes, WordPress is  a framework (of sorts) and when built correctly is a good framework for small to medium size sites.  OK, it is quasi-MVC.  It does abstract data, logic and design, but not as clear as other tools.  Since most people know about WordPress I thought I would put it out there.  Others known Frameworks:

  • FarCry (Also a Content Management System CMS)
  • Yii
  • Code Igniter
  • CakePHP
  • Drupal (also a CMS)
  • Expression Engine (Blog tool similar to WordPress)

The above list  could  grow really big, I just mentioned the one’s we like and use for our clients.

FarCry and Drupal enable developers to create large enterprise sites that support a large number of web pages and create custom applications that can all live in one cohesive environment. Frameworks like Yii, Code Igniter and CakePHP are useful in very custom web applications that do not require a CMS  and are centered on data management from the ground-up.

OUR FRAMEWORK FRIEND

Frameworks facilitate a systematic approach to web development for a website to grow, change and adapt to your needs with a methodology  that promotes faster and streamlined development in a more stable environment.  This approach enables web developers to offer their clients better tools to manage their web sites.  From simple content management to advanced control of product inventory, a good framework on a website is the best friend a site can have.
Interested in developing or re-developing a web site.  Just reach out to us and let us talk shop.

Leave a Reply

Your email address will not be published. Required fields are marked *