10 replies [Last post]
Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 4 weeks 3 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2043
Points: 2268

About 4 years ago I took a job for a local company as the lead programmer. My job was to maintain old sites and create new sites using ASP (the old version). I eventually talked everyone into migrating to ASP.NET and ASP.NET MVC. I've invested a lot of time in learning these technologies and a lot of money in application and server software. I've really enjoyed using Visual Studio, I'd say it's Microsoft's crowning glory but it's a ton of money.

Lately, I've been in a slump with it all. I just don't think it's worth fighting against the big guns anymore. PHP still has about a 77% share of the web. Microsoft tech hovers around 20%. Learning new technology sometimes means upgrading Visual Studio at right around $600. It's not that I want to get into PHP just because more people do. It's just that it doesn't matter what you use, it's how you use it. There's just so much more out there for PHP, so many more tools, so many more tutorials, so many more everythings. Most of it is free. .NET isn't faster or better so what's the difference?

I'm half way through a new MVC3 book and it's very little difference but requires a new version of the IDE for the slightly new view engine. Entity Framework seems to change and I don't understand it yet anyway. I guess it's just getting old to me.

I'm considering getting back into PHP or maybe Ruby on Rails since I like MVC (convention over configuration). I do have some knowledge of PHP but it's severely limited compared to what I know of .NET, I did write a plugin for phpBB and Wordpress but that's pretty much the extent of my work.

Any suggestions on some good books? Am I making a mistake jumping ship considering everything invested in .NET?

Tags:
Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 2 years 46 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

I took on a lead front end

I took on a lead front end developer position with a Ruby on Rails shop a couple months back.
The language is really clean and not too terribly difficult to pick up on, once you learn the "Rails way of doing it".
It's free, you can run local servers with ease, *nix boxes are cheap to rent for serving sites.
We tend to use nginx versus using Apache to serve the sites, which is a lighter, quicker web server.
We stick with MySQL for database, but we keep contemplating the switch to PostGreSQL

There are a handful of downsides to Rails that people who haven't used it will quickly bring to point.
When new versions come out, upgrading existing sites can be a HUGE pain in the ass, as a lot of times the code is not backwards compatible.
They do this to keep the framework light and quick, so they quickly remove deprecated code.
Most of the time, once you get a site running, unless there is a major reason to upgrade, you tend to keep that version for that site.

Learning gemsets, GIT repositories, and gems like Bundler, you can quickly roll sites with ease, run multiple versions of Rails for different sites, etc.
Github has tons and tons of repos for different gemsets, like Devise for user administration, Formtastic for easy semantic forms, Paperclip for file uploads, size management, compression, etc etc. You can also forget about FTP, and just setup Capistrano for remote server deployment from the terminal.

Welcome to the opensource world! There are tons of options out there.

On a side note, I am also a huge fan of WordPress. I've tried multiple PHP frameworks, such as Cake, CodeIgnitor, Zend, and a few others. They all seem really heavy compared to Rails and can tend to be a pain in the ass, or at least for me.

Hope that helps!

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 5 hours 28 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

V, I know zilch about asp and

V, I know zilch about asp and its flavors. I have had to debug its html output, and found it frustrating. The MSFT asp developers' community is particularly unhelpful compared to PHP's. That's my experience; YMMV.

Quote:

Am I making a mistake jumping ship considering everything invested in .NET?

Are you planning on forgetting all you know? If not, nothing is lost but infra- and extra-structures that demand new tools ($$$) at each upgrade. At MIT, they don't teach programming languages. They teach programming. It is a given that if you know programming, then languages are simply about syntax and features.

The PHP manual is a live document and each section contains user comments that really put flesh on the bare-bones technical stuff.

If you do decide to change emphasis to PHP, make sure to include the Smarty template engine. There are those who say PHP is a templating language, but until you make logic and structure totally orthogonal, you haven't used templates. I was introduced to Smarty when I took a PHP course at the local community college taught by Stan Guillory, senior systems engineer at Southwest Airlines, and one of the original six or seven developers of httpd at the University of Illinois, which became Apache. He was also active in the development of Mosaic, the web browser which morphed into Netscape.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 4 weeks 3 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2043
Points: 2268

Thanks, fellows. Gary, I

Thanks, fellows. Gary, I looked into Smarty before switching to .net but I really didn't give it a chance.

So from my current research, ruby on rails seems to be my best bet for happiness.

A few questions:

How is dependency injection and inversion of control handled in php?

Is there some equivalent to .Net's System.Web.Routing in PHP?

Is there some equivalent to Linq?

I really love Linq and Routing.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 5 hours 28 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

Verschwindende wrote: Thanks,

Verschwindende wrote:

Thanks, fellows. Gary, I looked into Smarty before switching to .net but I really didn't give it a chance.

If you go toward PHP, you really must consider Smarty, as it relates closely (in my view) to your question regarding dependency injection.

Quote:

A few questions:

I should point out that all my swimming in the programming pool is done at the shallow end. Do not expect erudition.

Quote:

How is dependency injection and inversion of control handled in php?

I don't know; at least not by those terms. As Guillory showed our class, it is beneficial to treat sections of the logic as black box modules. One does not query the database; one asks the query module to return the results. That way, the database in use doesn't matter. The DBMS admin can switch databases or even query languages without affecting the programming logic. Likewise, Smarty needs only to see a set of variables, and doesn't care how they were derived. Nor does the logic programming care how, when, where, or how many times the variables get used. Compare to the usual interwoven logic and front end mess that is common to asp and PHP. As to OOP, I am not convinced of its universal goodness; witness Java. I do like to program as if a module's methods and variables were private; call it a weak-assed structural/procedural programming

Quote:

Is there some equivalent to .Net's System.Web.Routing in PHP?

Is there some equivalent to Linq?

I really love Linq and Routing.

I lack familiarity with these, and Wikipedia did not arouse a longing to learn more. Tongue

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 4 weeks 3 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2043
Points: 2268

I don't know. PHP feels so

I don't know. PHP feels so archaic. I feel like I'm moving from a penthouse to Green Acres.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 21 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

It is so easy to write really

It is so easy to write really bad code with PHP but then perhaps that's more down to the users than the tool, the biggest benefit is the open source nature of it and the fact that with open source apps generally comes really strong extensive dev communities.

I had to work in ColdFusion for a while; trying to find code examples, help, anything really that is so easily available when working with PHP was frustrating - far too small a user base.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 5 hours 28 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

The more we get together♫♬

Speaking of community, keep in mind the PEAR - PHP Extension and Application Repository. (See the package lists.)

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 4 weeks 3 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2043
Points: 2268

Eugh. I think I'm going to

Eugh. I think I'm going to just skip PHP entirely and look into Ruby instead. Rails is familiar coming from ASP.NET MVC and routing is built in. I think ASP.NET MVC is M$'s answer to Rails. As long as I'm not losing too much or better yet gaining a few nice items then I think I'll be happy.

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 50 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

I don't know anything about

I don't know anything about either of them (except the guys here showed me how to do PHP includes) but I found you the Stanford Uni open class free open online class which includes about 3 hours of RoR...enjoy! Big smile

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 4 weeks 3 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2043
Points: 2268

Cool link. Checking it out.

Cool link. Laughing out loud Checking it out.