6 Tools To Be An Effective Web Developer

Over the last few years Rails has helped Ruby’s popularity explode. One of the biggest reasons for this is the time that Rails can save you. By working within a well defined framework a lot of development decisions are simplified and it is easier to be more organized. Throw in some great tools like ORM, Unit Testing, Mocking, and more and you have a powerhouse of developer efficiency and quality.

There has always been and probably always will be feuds over what is the best platform but what I want to show you is that those arguments are mostly irrelevant. Regardless of what platform you choose to develop on there are most of the same tools available in one form or another. The common components, for me anyway, that help me produce high quality code faster and is easier to maintain are a good IDE, easy to use unit testing and mocking frameworks, an ORM, a MVC framework, and a good JavaScript library.

I am a .Net developer by trade and a PHP developer sometimes by choice. I enjoy both environments for different reasons. I am going to talk about each of these components in a bit of detail and explain why I think they are important and then at the end of the article I will provide a list of each of these components for various languages (.Net, Java, PHP, Python, and Ruby). I have decided to only list free or open source tools because they are easy for someone to try out and we all like to save a few bucks.

The Integrated Development Environment (IDE)

To me this is the prime essential. Sure you can program in Notepad and compile with the command line but it will likely take longer and it will require more discipline to stay organized. With a good IDE you have easy project management (all you files grouped together with tabbed browsing), syntax highlighting, compilation (if applicable), and auto complete.

IDE are continuously getting more and more sophisticated and plugins allow for lots more functionality like svn and git management in the IDE.

For me my favorite IDE is Visual Studio. There are some other great programs out there like NetBeans and Eclipse but for whatever reason I have become partial to Visual Studio.

Unit Testing And Mocking

These two items go hand in hand. No application is complete without proper testing. There are plenty of people on both sides of the fence when it comes to testing. I know, I was a skeptic for a along time. It just felt weird to spend time writing code to test the real code I was going to write. Finally I just decided to give it a try and it has changed the way I program. When you are focusing on how to test your code you just write cleaner code and it’s nice to have a quick way to know if the change you just made broke anything.

Object Relational Mapper

If you have ever used an ORM you know that it can save you a huge amount of time. One of the concerns I had before jumping to an ORM was performance. I wanted to know if using an ORM would make my application slower but I was asking the wrong question. I should have been asking whether or not the small performance hit was worth the huge time savings. The answer to that is a definite YES! Rarely in an application will the ORM be the source of poor performance and if it is it can be refactored to improve or you can use straight SQL if need be.

It all comes down to not worrying about performance issues before you have any. Yes it is important to keep performance in mind but using an ORM shouldn’t be anything to worry about.

MVC Framework

MVC has become very popular thanks in part to Rails and it’s revolution in the way we do Web Development. The key component to it’s popularity is that it separates the different concerns of your application into seperate pieces. This separation allows easier testing, better design, and makes your application more maintainable overall.

JavaScript Library

It seems there is a JavaScript library for just about everything these days. I remember not too long ago there were that many and JavaScript use hadn’t exploded yet. A JavaScript library is important to your productivity. The library shouldn’t compensate for poor JavaScript skills, you need a solid foundation, but should compliment a good understanding of it. The library will take care of browser compatibility issues and low level operations letting you focus on getting the job done.

ASP.Net
IDE: Visual Studio 2008 Express
Unit Testing: NUnit
Mocking: Rhino Mocks
ORM: NHibernate
MVC: ASP.NET MVC
JavaScript: jQuery

Java
IDE: NetBeans
Unit Testing: JUnit
Mocking: EasyMock
ORM: Hibernate
MVC: Struts
JavaScript: jQuery

PHP
IDE: PHPEclipse
Unit Testing: PHPUnit
Mocking: PHPMock
ORM: Propel
MVC: Symfony
JavaScript: jQuery

Python
IDE: PyDev
Unit Testing: PyUnit
Mocking: PythonMock
ORM: SQLObject
MVC: Django
JavaScript: jQuery

Ruby
IDE: RadRails
Unit Testing: Test::Unit
Mocking: Mocha
ORM: Sequel
MVC: Rails
JavaScript: jQuery

Be sure to grab the RSS feed, get updates by email, or follow me on Twitter to stay up to date and not miss any posts.

kick it on DotNetKicks.com Shout it

Object Oriented Programming With PHP5: A Review

Object Oriented Programming with PHP5I was asked by Packt Publishing to do another review. After such a positive experience reviewing Blogger: Beyond the Basics I agreed to review Object Oriented Programming with PHP5.

I chose this book because PHP is a very popular language but is easily misused and because I was hoping to find some bits that I didn’t know about OOP PHP.

I found that this book was full of very useful information even as an experienced PHP programmer. I did find some of the wording awkward and there were a few mistakes in the code samples when it came the case of some words but this did not diminish the excellent value this book provides to the reader.

I would say this book is ideal for the beginner to average PHP programmer or someone looking to start or improve their understanding of OOP in PHP.

Book Highlights

I want to take some time and touch on what I consider to be the best parts of the book and give you a small glimpse into what this book has to offer.

Chapter 2 - OOP Overview

Chapter 2 discusses what makes up an object oriented language. Essentially, this is the most important chapter in the book because if it were the only chapter you would walk away with everything you needed to begin using the OOP style of PHP. This was done very well, with lots of code examples to make the concepts easy to understand. Everything beyond this chapter builds on these concepts.

Chapter 4 - Design Patterns

This is another important chapter. Design patterns are problems that regularly present themselves and the recommended solutions for those problems. Design patterns are just guidelines on how to best handle a given situation. I really enjoyed this chapter and it really adds some extra punch to the book.

Chapter 5 - Unit Testing

I was thrilled to see that this was included in the book. Unit testing is very popular and very criticized depending on who you talk to. As the lead developer in my company it is my job to ensure the quality of our software and unit testing is a useful tool for that even when I have to constantly insist that tests get written.

Chapter 7 - MySQLi, OOP Database Access

This was an informative chapter however it is funny to note that while the chapter is supposed to be highlighting the OOP usage of MySQLi the author uses procedural methods several times throughout the chapter. He uses mysqli_connect_errno() and mysqli_connect_error() instead of $mysqli->connect_errno() and $mysqli->connect_error().

Chapter 9 - Building With MVC

MVC is all the rage these days and no book on OOP and Design Patterns would be complete without looking at MVC. MVC is a pattern used in many popular frameworks like Rails, Django, and Symfony. MVC can be done in many different ways ranging from complex to basic implementations. Frameworks like Rails have builtin utilities that generate the repetitive and structured code for you as a base to get you started quickly. I tend to roll my own implementations and keep it simple and fast depending on the scope of the project.

Conclusion

Once again, I was impressed by this book and was glad that I had picked it up. It is great for beginners or those looking to improve with OOP. Give it a read sometime. You’ll be glad you did.