I know web pages should be past this, but this site doesn't look right on IE.
I will fix it some day ( not for IE 6 though) but for now this is easier and a lot more fun.

Download firefox or chrome or hide this message forever...
Feed32
100305.0

ubuntu and eee

With my netbook’s copy of the Windows 7 beta about to expire, I decided to give Ubuntu another shot. My previous experiences with Linux have been quite painful and in some cases it was easier to install a copy of Windows ME than force Linux to work right.

I downloaded a copy of Ubuntu 9.10 Netbook Remix for the net book and installed it off of a thumb drive. It installed without any issue and was the first time ever my wireless card worked out of the book with Linux.

It still has that slightly buggy Linux feel.
For example:

  • Firefox is set to open the home page when it loads but it always loads the last session.
  • Adding programs to the startup list doesn’t always seem to stick. I have had to add the same programs about three times each now.
  • Launchy doesn’t seem to want to open some files correctly and I get text files instead of Firefox.
  • Certain applications are always asking my permission to connect to unverified servers every time they open as Pandora, and I really don’t need that kind of security.
  • A GUI task manager because some programs keep locking up.
  • Eclipse can’t update and install any plugins such as Java projects.

Adobe has done a really good job with air and flash. Installing air and flash was a breeze and was the only way I could get a decent twitter client.

My two biggest complaints with it are the cartoony oversized controls (that has always bothered me with Linux) and the lack of polish.

I’m going to keep it and am enjoying it greatly; however, it’s not ready for the type of users that don’t care about learning how computer their computer works. My wife would be lost in Linux even though she has been using a mac for three years now. She doesn’t need to spend time customizing everything to work right.

Over the summer I picked up a ASUS EEE 1000HE netbook. The first thing I did when I got it was install win 7 and upgrade the RAM to 2gigs.

asus 1000 he

It advertises 9.5 hours of battery life and with win7 installed, I was not expecting to get even close, but I usually get over 8. Now, that’s with the monitor dimmed and the turbo button set to auto-mode. Yes, it has a turbo button. I was a little disapointed at first but it’s a nice throw back to the earlier days of computers. The auto-mode doesn’t get in the way much. Most of the time I am typing or reading the minilappy doesn’t need to do much.

As a dev machine, it’s decent. I have it running Visual Studio 2008 with Coderush. The screen real estate is a little tight. When Coderush runs a template, it tends to lag a little, but that’s mainly do to the hard drive. Also VS lags a lot when programming XAML.

For surfing the web, it’s awesome. Chrome is as zippy as ever on this little machine. And small size and ridiculously long battery life makes it an awesome machine for living on the couch.

At conferences, it’s great. Usually power outlets are a rare commodity. With 8+ hrs of batter life and a little prior planning, I free from searching for a place to recharge all day.

Overall, I wouldn’t use this as my main machine, but as a secondary, it is awesome.

code reference for INotifyPropertyChanged

I implement INotifyPropertyChanged in alot of projects I work on and I need a place to reference it. (copy and paste)

#region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; private void RaiseEventPropertyChanged(PropertyChangedEventArgs e) { PropertyChangedEventHandler temp = PropertyChanged; if (temp != null) { temp(this, e); } } private void OnPropertyChanged(string propertyName) { // perform pre event work // create args and raise event. PropertyChangedEventArgs e = new PropertyChangedEventArgs(propertyName); RaiseEventPropertyChanged(e); } #endregion

091024.0

goodbye vb

After programming for a year in C# and using VB occasionally, I can’t tell you what the difference is. With the exception of a the key words, the two languages are the same to me. I still hate semicolons every where and the defaults for the C# brackets are ugly.

With that being said, I perfer C# to vb now. Sorry Beth Massi. It’s nothing that vb has done. I can do everything I need to do in C# in VB. The force pushing me to C# is the internet. All the blogs I follow and the open source "projects"http://www.nunit.org/index.php I use have written their code in C#.

Now it may sound like I’m following the crowd, but I don’t think that is a bad thing. By switching to C#, I don’t think I will be able to code better. However by doing so, I’ve eliminated the context switching I have to do. When I look at their example code or the source code of the project. I can look at the examples and my code to see where I have gone wrong with out having to translate anything in my head.

So farwell VB. It’s been fun and I hope we meet again some day.

Being a developer I am often asked by friends and family to make webpages for their small business. Most want a basic CMS with some snazy design. I would love to help and I am cheap. I usually go for a nice meal or a few bottles of beer, but the amount of time i can spend on it and what they want makes it not worth it. That and my art design skills aren’t really up to par. A web design company is overkill for these people. I have been searching for some kind of alternative. This is what they need:

  • A presence on the web.
  • An easy way to update the site theirself.
  • A web-based way to pass information on to their customer base.

Wordpress is a great way to setup a basic website for a small company that doesn’t need a web-store. While I am aware that Wordpress is a blogging site, it works great as a basic website.

Why you should use Wordpress

It works great

There is a great team of developers working on Wordpress. They are constantly innovating and adding new features and fixing bugs and security holes. There are also thousands of people using the site so every part of it has been tested and retested.

Wordpress Hosts It

Your website is hosted by Wordpress. This means neither you nor I have to deal with setting up the website on a server at a hosting company. You don’t have to worry about your website going down because there is a team of people working to make sure it stays up. You also don’t have to worry about update the site because the Wordpress team updates the software for you.

Cheap

Hosting through Wordpress is extremely cheap. It’s free. However, if you want to look professional it will cost you a little bit of money. About $50 a year which is about what taking me out to dinner or a few bottles of beer costs. I drink fancy beer.

Free design

I am not a designer and am not the best in photoshop. That’s ok. It’s not my job. But there are a lot of other people out there who are graphic designers. A lot of them have taken the time to create themes for Wordpress. The hosted version of Wordpress has about 40 free themes that were created by some excellent artists. If you decide to host it yourself, there are hundreds of themes that people have created and released for free use.

Fast

Most of the work is already done. It will take a little time to get used to using the dashboard and setting everything up they way you want it but nothing like the time it would take to do it from scrach. A dedicated weekend is about all it would take.

Support

Wordpress has a very active community and there are a lot of excellent help guides out there. If you do feel you need a custom theme for your site or some other kind of changes, there are lots of web developers and designers that specialize in Wordpress.

How do you set your Wordpress

Sign Up

First things first, you need an account. Head over to wordpress.com and sign up.

Basic Settings

There are a few things that you should change in the settings so head into the dashboard of your webpage.

  • Change the home page to your home page.Click on a static page. Click on Settings in the lower left hand corner → then Reading → then click on the radio button “A static page (select below)”.
  • Click on the Appearance button on the lift side and then click ‘Extras’ then uncheck both checkboxes on the pages and click update.

Select a Theme

This is the most fun part. If you are anything like me, you will spend hours flipping through the themes and testing them out. Here are my recommendations for what you should look for.

  • Look at themes that allow you to upload a custom image header.
  • Don’t focus on the color too much because that can be changed later on. For instance, if you find one that you like but all the links are red and you want them to be green, don’t worry about it. That is an easy css fix.
  • I would try to stay away from themes that have two-side bars. That works great of a blog but not so much for a company website. Side bars are for widgets. If you do two of them, you will be tempted to go widget crazy which will detract from the overall message of your site.
  • Think about your company’s image while selecting a theme.

Widgets

These are little gadget type things that show up in you side bar. Be selective on which ones you select and don’t go overboard. Alot of these are geared towards blogs and have little use on a company’s website. Here are a few recommendations that will complement a company’s website:

  • Text Area: is a great way to add a little bit of information that stays constant on every page. This is a great place to put your contact information.
  • Search Box: will help your customer find what they need a little faster.
  • Pages: is a must if your theme doesn’t a navigation bar built into it.

Go ahead and try out some of the widgets to see if there are others that suit your needs, but if you find yourself wanting to use more then four, you might want to rethink a few of your choices. Now, if you really want to get savvy, you could use the RSS widget to have your twitter feed show up in the side bar. This would be applicable to your business if you are looking to grow through social networking ( which isn’t for every business ) or your business has information the requires daily updating such as nightly food specials. If the word twitter or RSS scares you and you are just happy to get a website, then don’t worry about it.

Pages

This is the where you will put all of your information. Because of the way Wordpress is setup, you have to have a home page. Here are a few things to keep in mind about home pages:

  • Keep it simple
  • Think about doing a brief summary of your other pages and include links to them.
  • Don’t put a cool flash video on it. It’s not cool.
  • Make it genuine and give it substance.
  • Don’t make it sales pitch.

Here are some other possible pages you could add

  • Contact Information – To me, this page is a must
  • Product/Services/Rates
  • Portfolio
  • Tour of the Premises ( only do this if you are selling the location such as a Hotel, a Winery, etc)
  • Local Points of Interest ( would be go for a outdoor equipment rental in a small town)
  • Awards
  • Menu
    Consider what you will put on your pages and if you need really need them. Do it with you customers in mind. And if find yourself with a page but it just doesn’t seem right, hide it and someday it might work out.

Advanced Changes

Until now everything about your site has been free. Now you are going to start giving money to Wordpress. It’s ok, it isn’t much. All of these upgrade are available through the Upgrades button at the bottom left of the dashboard.

  • You must buy the Add Free upgrade. This isn’t a choice. Do not think about having adds on your company’s website. There are a lot of ways to be cheap and this shouldn’t be one of them.
  • You must buy the custom url upgrade. This way your website will be your_company_name.com instead of your_company_name.wordpress.com. This one will be the most difficult. You need to buy a URL before you get the upgrade. wordpress.com says you can buy it from them or someone else. More information can be found though wordpress support
  • If you plan on changing any of the colors you will have to buy the Custom CSS upgrade. If your first thought on seeing that is “WTF is CSS?” than you will need to find a hungry graphics student and offer to feed them if they make your changes or you could learn CSS. It’s not really that hard to do most if it. It only seems like magic. But it does take time and I know that is a valuable resource. The best tutorial for learning CSS is W3School’s CSS Tutorial. W3Schools also has an excellent tutorial on HTML if you need that too.

What you should put up

Less is more, be selective

It’s tempting to put up everything you can think of on but the more that’s on your website, the harder it will be for your customers to find what they need when they go to your site. Your time is valuable, but so is your customer’s time. Take the time to sit down and go through everything before it goes online. Don’t take your traditional marketing document and copy and paste it onto the website.

No one cares about you.

What I mean by this is don’t create giant about me page that tells your entire history. Your customers are going to your site to find information, not do research on you. Think about the last 10 company websites you went to. Out of those websites, how many of them did you read about their history? Now there are exceptions, but before you do it, think long and hard to make sure it adds value to your site.

Contact Information

Make it easy for your customers to find how to contact you. Have your store hours, email, address and phone number available. Make sure that email address goes somewhere where you see and respond to people.

Update the site

Make sure you are keeping the information up to date. Preventatively, don’t put anything on the site that you aren’t willing to update when it changes. For example, if you are a restaurant and you have daily or weekly specials, don’t put them on the website unless you are going to update them every time it changes. There is an easy way to do this with Wordpress. Back when we setup Wordpress, on of the first things we did was change the home page. Right below that option, there is a way to create another page to be a post page. There are benefits to doing this. For example, sites that are updated more often will appear higher in google.

Show Self Control for Technology

Yes, this is the most hypocrite thing I have said today. Don’t add something to your site because it looks cool or because you like it. This goes double for widgets. If there is not a direct benefit to your customers, don’t do it. Create a personal site and add it there. Oh, and “Because it looks cool” is not a benefit. Make sure your design compliments your message and not the other way around.

It always bothered me that setting the background of a control to transparent doesn’t actually make the control transparent. I always assumed that because that didn’t work, the workaround had to be messy and difficult. After a little bit of searching today, I came across this awesome code from Tobias Hertkorn on his T# blog. It turns out the solution is a pretty elegant and I not sure why it .net team didn’t make it a property that was easy to set.

Here is his code (C#):
public class TransparentPanel : Panel{ protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.ExStyle |= 0x00000020; // WS_EX_TRANSPARENT return cp; } } protected override void OnPaintBackground(PaintEventArgs e) { //base.OnPaintBackground(e); } }

Here is the VB version of it:
Public Class TransparentPanel Inherits Panel Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams Get Dim cp As CreateParams = MyBase.CreateParams cp.ExStyle = cp.ExStyle Or &H20 'WS_EX_TRANSPARENT Return cp End Get End Property Protected Overrides Sub OnPaintBackground(ByVal e As System.Windows.Forms.PaintEventArgs) 'MyBase.OnPaintBackground(e) End Sub End Class

The 20 hex comes from the WINUSER.H and there are a few more properties that ExStyle affects. Also, if you plan to have content under the transparent control that is changing often, you will need to add some kind of means of refreshing the transparent controls such as a timer that calls refresh().

090119.0

yield filters

I recently discovered the yield keyword combined with IEnumerable functions in C#. It is a great way to filter lists of items.
For example:
private void SomeFunction(){ //some code foreach (Animal a in FilterAnimals(animals, 2, true)){ // do something with each two legged, winged animal } //some more code } private IEnumerable<Animal> FilterAnimals(List<Animal> animals, int legs, bool hasWings){ foreach (Animal a in animals){ if (a.Legs == legs && a.HasWings == hasWings){ yield return a; } } }

The first time I saw this, I thought it was an N 2 loop. However, the yield preserves the state of the function so the whole list is only looped over once. The original list of animals is still the same as it was before.

Goal 1 Learn a new programming language

Over the course of the year, I am going to learn a new programming language. I have been using Ruby for a few years, but I think it is time that actually learned it. It’s one thing to use a programming language, but it is another to know a language. While learning ruby, I want to get the hang of IronRuby

Goal 2 Read more books

My goal is 24 programming books this year. I am starting with CLR Via C#.

Goal 3 Write more

I am not very good at writing and I that is because I don’t write much. I plan to write more posts on WilliamSmash and on WilliamSimmers. My goal is one post a week on each blog.

Goal 4 Write a video game.

I would like to write more than one game, but if I make a game that works very well I’ll be happy. I plan to make a tower defense game using the XNA framework.

Goal 5 Learn Test Driven Development

I am still learning TDD but I really see the benefits. This will go well with Goals 2 through 4. I really want to get the hang of it.

That’s it. I thought I would keep it simple.

MyGeneration is an open source code generation tool. I love using it but I felt that opening up MyGeneration every time I needed to update or create a generated file was too time consuming. Yes I am that lazy. There is a command line tool that comes with MyGeneration called zeuscmd.exe. Documentaion on zuescmd is sparse. zeuscmd has four switches that I care about

Switch      Effect
-t the path to the template that zeuscmd is going to use
-o the path where the output from the template will be saved
-i the path for the xml based input
-c the path where the input params are saved

The -i switch is the one I am the most in; however, I couldn't find any documentation on the format of the xml input. After a little playing around with "MyGeneration":http://mygeneration.sourceforge.net/ I was able to figure it out and I figured I would put it on the web. < ?xml version="1.0" encoding="utf-8"?> < obj name="" uid=" the guid of the template " path=" the full path to the template "> < items> < item name="parameter name no spaces" type="System.String|System.Boolean|etc" val="the value of the input item" /> < item name="dbname" type="System.String" val="database_of_awesomeness" /> < item name="your_own_param" type="System.String" val="value_in_the_template" /> < /items> < /obj>

Note: the extra spaces in the tags are there so they will render on this website

Now there a few input values that MyGeneration uses and you probably have to pass them in order for the template to generate. These are the MyGeneration values for the template I am running on my computer. I am using sqlexpress as the db and vb as the template language.

Key Value
__dbConnectionString Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=myuser;Initial Catalog=mydatabase;Data Source=myserver
__dbDriver SQL
__dbLanguageMappingFileName C:\Program Files\MyGeneration13\Settings\Languages.xml
__dbTarget SqlClient
__dbTargetMappingFileName C:\Program Files\MyGeneration13\Settings\DbTargets.xml
__defaultOutputPath C:\Program Files\MyGeneration13\GeneratedCode\
__defaultTemplatePath C:\Program Files\MyGeneration13\Templates\
__domainOverride True
__language C#
__userMetaDataFileName C:\Program Files\MyGeneration13\Settings\UserMetaData.xml
__version 1.3.0.0
081214.0

william simmers

I just setup up a new blog for some of my cooking recipes. My first recipe is prune chili. It sounds weird but it is really good. Check it out at william simmers.

Everything I learn in C#, I like to duplicate in VB.net. Usually I find things a lot easier with VB.net even if it is a little more verbose. However, delegates really suck in VB.net 2.0. You can’t do inline delegates in VB.net 2.0. You can still pass them as parameters, but you can’t create them inline like C#. Instead you have to create a function and pass the address of that function as the parameter.

Public Sub SomeCrazyFunction() Dim items As New List(of String) items.Add("Brian") items.Add("Peter") items.Add("Lois") items.Add("Meg") items.Add("Chris") items.Add("Stewie") '-- do some stuff items.RemoveAll(AddressOf InNotCoolPerson) '-- do some more stuff End Sub Private Function IsNotCoolPerson(ByVal item as String) as Boolean Return item.Equals("Meg") End Function

That’s ugly. I think that is much more cumbersome then the C# version. It forces the delegate code to exist in apart from the related code and while you can reuse that function ( where as a delegate, you can’t) I resides out of context from the rest of the code it relates to. In VB.net 3.0, it’s back to the C# style with the introduction of Lambda functions .

items.RemoveAll(Function(s As String) s.Equals("Meg"))

This is even less verbose then C# 2.0 implementation of delegates, but C# got lambdas too. And there code is once again more concise than VB.net.

items.RemoveAll( s => s.Equals("Meg"))

I have recently discovered delegates in C# and find them to be indispensable. Below are a few examples of using delegates with Lists. Lets start with a simple list of strings:

List<string> items = new List<string >(); items.Add("Brian"); items.Add("Peter"); items.Add("Lois"); items.Add("Meg"); items.Add("Chris"); items.Add("Stewie");
Now if you want to sort this list all you have to call

items.Sort();

and the list in the order: Brian, Chris, Lois, Meg, Peter, Stewie.
But what if you wanted to sort by the length of the string? That could get a little tricky; however, with delegates, it’s not bad at all:
items.Sort(delegate(string s1, string s2) { return s1.Length.CompareTo(s2.Length); }); and you get the list in the order: Meg, Lois, Peter, Brian, Chris, Stewie.

Lets look at some other application of delegatesa with Lists. Lets say you wanted to get all the strings in the list of a given length.

int length = 5; List<string> lengthOfFive = items.FindAll(delegate(string s) { return s.Length == length; });

and the list lengthOfFive contains Peter, Brian, Chris.

What if you need to do something for each object? You could use the a delegate with the ForEach function. This will print the total number of letters in List of strings:

int letters = 0; items.ForEach( delegate(string s) { letters += s.Length; }); Console.WriteLine("Total number of letters: " + letters);

and this will print all the strings in the list:

items.ForEach(delegate(string s) { Console.WriteLine(s ); });

We can get easily rid of Meg, because let’s face it, no one likes Meg.
items.RemoveAll(delegate(string s) { return s.Equals("Meg"); });

and now we have list that doesn’t have Meg in it.
When a List of strings is no longer good enough and we need a List of Person we can use the ConvertAll to help us out.
List<Person> people= items.ConvertAll<Person>(delegate(string s ){ return new Person(s); });

My List

Notepad++

I know most people use notepad++ but I don’t like it. It has a clumsy and cluttered interface. There are a few cool features; however, I suspect the main reason why it is so popular is it is an opensource texteditor.

Notepad2

I love using Notepad2 to do quick things or look at config files. It has a large amount of languages for syntax highlighting and is very quick to load. It also fits nicely on a thumb stick for working on those computers without a decent text editor. I use it for quick edits and it has VBScript highlighting which I find useful when I am looking at VB files and don’t really need Visual Studio’s bloat.

e.TextEditor

A blatant clone of textmate. They even say it is on the home page. It has almost all the same features as Textmate, but a lot of them need cygwin to run. I have downloaded the demo a couple times. I have had it lock up on me a few times, but that was about a year ago. Also the way it does projects, while I like it, is somewhat awkward and needs a little work. There should aleast be a refresh button and an easier way to save file directly to a folder. For $35 it’s not a bad price ( a lot cheaper than UltraEdit ).

Intype

My second favorite vaporware (First is Duke4). It has been in alpha since jan 2007. It also is a textmate clone even though they say it isn’t. It’s fast. For what it can do it is really fast. Unfortunatly, its dev cycle is really slow. Intype has a long ways to go. I was using the Alpha 0.3 release for over a year and am still waiting for the next alpha. Right now it isn’t tabbed text editor with pretty colors ( I love pretty colors). In one of the unstable releases, it has a project manager, but it was as the title said: unstable. You can see the potential in the design and the developer is very capable of adding all the features need.

Sublime Text

This is a really cool text editor. A lot of cool things are this that I haven’t found in other text editors. It is setup to quickly create and reorganize split views with multiple documents; the pane on the left shows a birds eye view of the entire document; it allow multiple text selection. ( yah, you can select multiple noncontinuous lines of code and it’s not awkward to do). There are a few drawbacks with sublime text. It seems a little buggy. More than once it ran away with my cpu and I had to kill the process. It is a bit of a memory hog even on small files. Also, it costs $60. I’d buy it right now for $20, once the issues with the resources are fixed $30, and when projects are added $40.

Conclusion

Personally, I have settled on e.TextEditor with a splash of Notepad2. I like the familiarity of e.TextEditor because I only use TextMate on my mac. I like the speed of Notepad2 for quick edits.

Side Note

I left a few off the list such as UltraEdit and Programmers notepad. They are fine tools, I just don’t care for them. I am old and picky and like pretty things.

Everyone has a few apps they have to have on every computer. Here is my list

A little background. In college I was a Java developer. I became a VB6 developer four years ago and about two years ago I became a VB.net developer. About three weeks ago I changed jobs and became a C# developer. While it is a very similar world (almost the same) there are a few differences that are slightly annoying and a few things I like. There are more differences, but these are the ones that are most striking to me with simple every day development.

Dislikes

Semi-Colons

When I got into VB I thought I was done with semicolons. They are point less. To a computer the difference between a semicolon and newline is a few bits. I am already going to do a new line, why do I need to do a semicolon too. I don’t get it.

Capitalization

C# is a lot more picky with capitalization. A lot more. It knows what is right, but it waits until you screw up and have to go back over it and press Ctrl+Space before it fixes it. VB would correct it for you.I miss that.

Curly Bracket White Space

I hate the ‘{’ lines. Everytime you do a ‘{’ in C#, you devote an entire line to it. The default in C# (and as a result most companies) means an if statement is

if (stuff) { //then do stuff } else { //do other stuff }

In java, I always did it like this:

if (stuff){ //then do stuff } else { //do other stuff }

and in VB, I did it like this

If stuff Then //do stuff Else //do other stuff End If

That’s half the lines in the second version than in the first version. I know it is a little picky, but I like having as much information in the screen as possible. Extra whitespace is for webpage design.

Events and delegates

I hate the fact that it’s so complicated to raise an event. You have to create a delegate, declare an event and then when you want raise the event, you have to check to see if it is null first. VB, create an event and raise it when you want to.

Includes

It is probably about the same as VB, but it seems like C# wants to pout more if you don’t do your using before you use the classes first.

What’s Good

Initialization

Declaring a variable in C# is a lot better. While Dim reminds me of Assembly, it’s stupid. Why do I have write Dim message as String instead of message as String or String message
Mulitline Comments

/* is way better than ’ at the beginning of every line.

Boolean Conditions

&& is why better then AndAlso. Also I don’t like having to start my condition with Not when I am using Is.

Like I said, there are more differences, but these are the ones that are most striking to me with simple every day development.

I am going to try to do my first real post tomorrow and once a week from here on out.



Remember to stay on the peak of the Ballmer Curve

What is Rails?

Ruby on Rails is a web development framework written in Ruby. It was extracted from code in a 37 Signals web application Basecamp. Since it’s inception, its purpose was to speed up the development process for web applications. It has strong integrated support for JavaScript and databases that make integrating AJAX (Asynchronies JavaScript and XML) a faster and more enjoyable process for developers. Because of the philosophies in the Rails community, the structure of the project also speeds up development and maintenance of the Web App.

Philosophy

Model-View-Controller

The MVC pattern is the most predominant theme in the Rails framework. The Model is your data object and is implement through the ruby project ActiveRecord. The Controller is a class the holds the business and application logic and handles the basic routing. The View is handles by ERB files. These are html files that have ruby tags in them allowing data to be added.
Convention over Configuration. Another prominent philosophy in the Rails community is Convention over Configuration. The designers of Rails felt it was more import to take the time to come up with appropriate settings then have giant configuration files scattered throughout the project. While this does make the project easier to get up and running, if you need to do something that is out of sync with the Rails philosophy, it will take a little bit of work.

Don’t Repeat Yourself.

The DRY philosophy is a major philosophy in Rails code and means to stay DRY are built into the Framework. Every controller has a helper class that contains methods needed in views. The application also has a helper class, allowing the programmer to create custom tags for ERB files, allowing even HTML and JavaScript to be refectories. Views can also be made DRY by creating partial views, which can be used in other views.

Representational State Transfer (RESTful).

RESTful web services are also built into the framework. REST is a design pattern for web services. There are four functions in a RESTful service: create, update, delete, and read. All data is sent and returned in XML format. Rails has been built so that an entire RESTful service can be built using a single command. The Rails community has shied away from the WS-* primarily due to its complexity and unpredictability in any developer can setup and commands they want. Other benefits include shorter response times due to caching.

Reasons for Rails’ Gain

Rails has shot into the spotlight in the past few years. It has been heralded as a great productivity increaser and all over the web there are blog posts about teams scrapping their half finish projects and for Rails and still completing them ahead of time. Rails isn’t the magic solution to web development but it does solve some things right out of the gate and make others more simplified.

If the web project does not fall into the basic category of the CRM and depends on database interactions then Rails will do the job well. It has out of the box support for most major database so programmers do not have to spend time setting up database connection. In addition, Rails has integrated support for the Prototype and the Scriptaculous JavaScript libraries, which give the developer built in support for AJAX and interactive pages. If there is a need for a JavaScript functionality not provided by the libraries, the developer can use ruby to write JavaScript code using RJS (Ruby JavaScript). Deployment tools are also built into the framework such as Rake, which aid in the deployments of projects.

The Influence of Rails.

The rise in popularity of Rails has greatly effected web development. There has been a rise in frameworks across the major web development languages. Python’s main contender is Django but TurboGears also has had a lot of press. Both are structured very similar to Rails and are often compared. The PHP community is noticing this as well and its main project is CakePHP. Microsoft has also taken notice and its next version of ASP.net is based on the MVC structure. There are also Java projects that are being worked on with a similar structure.

Rails has also effected Ruby. Ruby went from being a relatively obscure language to being the ninth most popular language. Sun has taken notice of Ruby. They have provided a large amount of resources for Ruby and Rails developers and have setup a developer site. JRuby has also had a spike in interest.

Drawbacks with Rails

Rails does have some drawbacks. The main problem is scaling, think twitter . Rails is best run with either the Mongrel server, a server written in Ruby, or fast-cgi; however, these are both slow solutions. Because of a problem with the mod_ruby project, Rails does not integrate with the Apache server like Python can. This problem made headlines recently, when there was a rumor leaked that the social network site Twitter would be dropping Rails in favor of tools that are more scalable.