Solved

MVC vs basic pages

Posted on 2014-04-28
5
210 Views
Last Modified: 2014-09-02
We're a small business where our clients have specific business goals to meet and most of the time have specific business reporting. Many of our backend business tools (SCRUD) are built in either msaccess or basic php pages. To explain 'basic php pages', for instance we have a search page that allows management to search customer orders and view details of those orders and cancel or add notes to the orders. The code written for the search page is written basic top down style with database code mingled in with presentation code.

We have recently hired a developer to help us with rewriting our backend process's using MVC style of coding. We're comfortable rewriting our code in top down style with the mingled database/presentation logic. Looking at the code written by the developer in MVC style seems like overkill for what we want to get done and we're trying to figure out the benefits to adjusting our coding habits to think of coding in this MVC style. The developer uses MVC style along with many other 3rd party add on's (slim/paris/idiorm/smarty)

Today I have a simple report to display which would return values from a single db table with only date parameters. I'm looking at the daunting task of learning this developers style along with these 3rd party addons along with MVC style of coding. Its just a little overwhelming and I'm having second thoughts on whether MVC along with all these addons are worth learning to support the rewriting of our backend business tools.

I'm looking for help deciding whether MVC and these addons are worth our time:

What are the advantages of any one style over another, assuming MVC is the most popular are there other alternatives? Data security is our top priority since we're moving our backend tools from an intranet to the internet.
0
Comment
Question by:Dalexan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40027280
MVC gives your code a clear separation of concerns. You've already stated that you have "database code mingled in with presentation code." This is a fragile design. Now if you have to move to a different presentation framework or if you move to a different database backend, your presentation logic has to change. With a clear separation (doesn't even have to be MVC) you avoid such dependencies.

So, do you have to learn MVC? No. MVC is just the "hottest thing out" right now. That said, it is a solid architectural style, and can be translated into any programming language. It can even be used in non-web projects. Admittedly, there is a learning curve. You would not be doing yourself a disservice by learning the style, though.

MVC can help with security in that your separate out the concerns between the layers. However, it's primary goal isn't security. For security you need to be mindful of how you write your queries, how you validate your user inputs, and how you authenticate/authorize your users.

The only other styles I know of on the web is MVP (model-view-presenter) and MVVM (model-view-view_model), neither of which is as prevalent as MVC. The latter is really more of a WPF/Silverlight architectural style. MVP is close to MVC in structure. If I recall correctly, the only real difference is which layers communicate with each other. I'm sure there are other styles, though.
0
 

Author Comment

by:Dalexan
ID: 40027336
Thanks, pretty good description.
What about the 3rd party stuff, SLIM in particular?
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 40027381
I have to defer on those. PHP is not my main language, so I am unfamiliar with the 3rd-party tools available for it.
0
 

Author Comment

by:Dalexan
ID: 40027474
Thanks Kaufmed, you've won most of the points but I would still like to hear more comments regarding the 3rd party stuff. SLIM,idiorm etc...
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40298567
I should correct myself on an earlier statement. MVVM is actually growing in popularity. Many of the Javascript frameworks out now are leaning towards MVVM.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question