Hacker News new | past | comments | ask | show | jobs | submit login

You know, I'll probably be bammed for saying this, but reading through this very well-made tutorial gave me the opposite reaction.

I am glad I learned and still use PHP and not RoR.

IMHO, there are way too many black-boxes and unnecessary abstractions for such a simple pattern as MVC, which is really nothing more then connecting HTML views to database fields view URI routes.

I recently struggled through my first Ionic mobile app, and all the prebuilt, "auto-magical" tooling stacks and opinionation I see in the tutorial leaves a sour taste in my mouth ie

  gem 'rails',        '5.0.0'
  gem 'puma',         '3.4.0'
  gem 'sass-rails',   '5.0.6'
  gem 'uglifier',     '3.0.0'
  gem 'coffee-rails', '4.2.1'
  gem 'jquery-rails', '4.1.1'
  gem 'turbolinks',   '5.0.0'
  gem 'jbuilder',     '2.4.1'

  group :development, :test do
    gem 'sqlite3', '1.3.11'
    gem 'byebug',  '9.0.0', platform: :mri
  end

  group :development do
    gem 'web-console',           '3.1.1'
    gem 'listen',                '3.0.8'
    gem 'spring',                '1.7.2'
    gem 'spring-watcher-listen', '2.0.0'
  end

  group :production do
    gem 'pg', '0.18.4'
  end
All this for a "toy-app"?

Call me old-school (and I am I suppose, altho I feel I make an hell of an effort keeping up to date), but I cut my programming teeth in C and always respected the very limited but powerful instruction set that language implements, and I, over the years now, respect PHP for creating very powerful constructs (like its magical array handling) but also keeping some C-like simplicity at its core.

Yes of course PHP has its idiosyncratic issues, but I still feel that one of the primary reasons it's so disrespected, I'm very sorry to say, is the snob factor thrown off by serious motherfucking programmers whom seem to feel that the simplicity and power of the language lowers the bar so low that it allows the "unwashed" into the room or something...

To me, thats not a bug its a feature.




No. With that stack you can build business and make money. Not a toy app.

That being said, if you were doing a toy app then you would take out PG. You don't need all the dev gems they just make your life easier / faster startup. If you come from php then you like to make your life hard, so webconsole and byebug are out. Your doing a toy app so you don't need turbolinks, coffescript, or Sass. It's a toy so what does it matter if a person downloads 3MB of javascript. Take out uglifier. You're not doing an API so jbuilder is gone.

This is the new Gemfile.

  gem 'rails',        '5.0.0'
  gem 'sqlite3', '1.3.11'

People make Rails out to be some magical monster that know one knows what is going on. It's just Ruby at the end of the day.

Here is a single file rails boot, that includes downloading the gems and running a test.

https://github.com/rails/rails/blob/master/guides/bug_report...


That's an unfortunate viewpoint. The point of higher level languages is to provide abstractions. To say PHP is just the right combo of not too high level enough but not too low level is some kind of mental gymnastics to justify its existence. The same argument could be made for using C over PHP.

Also, consider that some languages' ecosystems have preferences for smaller vs larger standard libraries. Clearly most of the dependencies you listed are not actually required; they're made to be stripped out if you're not using them. It's disingenious to state that those are the minumum needed for a toy app.


Personally, I just don't like PHP because I think the syntax is aesthetically ugly.


By those criteria I have to wonder why you're not working in Perl, which is even closer to C and the metal than PHP.


What do you mean by "magical array handling"? It is the most obscure construct I have ever seen.


Most of those are optional libraries and rails does a hell of a lot more than a base install of PHP. PHP is also only "simple" if you ignore the god awful language semantics and inconsistencies of both the language itself and the standard libraries.


First, Rails is not intended for toy-app. You can build it but RoR is production ready apps. So the stack you get reflect that. Also, you can drop like half of those gems if you do not need them. And finaly, if you are going to do any non-trivial app in PHP you will either reinvent similar libs yourself, or you will use Symfony, Laravel, etc. and get a comparable bunch of dependencies with Composer.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: