Ask HN: I want to write a simple webapp, how should I start?
31–40 of 60 posts
Re: Ask HN: I want to write a simple webapp, how should I start?
#32Language choice.
For a long time PHP was the defacto standard. It has a lot of resources and tutorials plus the advantage of a huge amount of hosting options. However, I'm the last five to ten years, the field has opened up. Ruby and python both have strong communities and with app hosting solutions like Heroku, it is just as easy to get them up and running. All three are fine choices and if you're looking to make a career of web programming, you'll find plenty of jobs for all three.
Frameworks.
Frameworks are essentially scaffolding you can build your app around. The benefit is that you can get up and running pretty fast with them. Ruby has rails, python has django, and php has a plethora, with laravel being my favorite right now.
The downside of these is that they add another level of complexity to your app. In addition to learning the basics of a programming language, you also have to learn about routes,models, controllers, etc. While this information is very beneficial to have, it could overwhelm when you're just starting out.
If you want an app working fast, you can try one of the frameworks. However, if you want to understand the language more fully, at the cost of time, you may want to try your hand without a framework. If you do choose that route, php may be the best choice, since it was the only one designed specifically with web programming in mind. I'd reccomend php with mysql (using PDO for database interactions).
I'm currently on mobile right now, but if you'd like any more resources I can reply when I get to a real computer.
Re: Ask HN: I want to write a simple webapp, how should I start?
#33Re: Ask HN: I want to write a simple webapp, how should I start?
#34If you go with PHP, I would suggest learning how to use Composer[0], PHP's sort of de facto package manager, to organize your project. What you're describing seems like a really simple application, but even so, with dependency management, a router and the PSR autoloader it's much, much easier. Of course, choosing another language (Python, Ruby, whatever) will likely mean choosing a framework and the package manager f…
Wow, thanks, haven't thought of that. I was thinking to use either a virtual machine or the LAMPP stack on my NAS/Raspberry. I tried Xampp, but it kind of screwed with my installation back than. Plus, the Pi isn't really doing anything, time to change that.
Re: Ask HN: I want to write a simple webapp, how should I start?
#35Although if you're just looking at learning how to CRUD, then it's a good learning exercise.
Re: Ask HN: I want to write a simple webapp, how should I start?
#36If you want to go up with PHP then better use Laravel + Mysql or Postgresql. And if you want to learn you can opt for laracast.com videos. They are one of the best resource for laravel. P.S Laravel is one of the best PHP based framework.
Re: Ask HN: I want to write a simple webapp, how should I start?
#37The thing is, there are really lots of ways something like that could be achieved.
I use Ruby/Rails for philosophical reasons; I really love the language and framwork. I could do php - i just don't like php. Been there, done that. Others prefer JS for everything, or maybe ASP. None are "wrong". but there are differences and tradeoffs to each path; its not arbitrary by any measure.
If you want some fancy search, I do favor elasticsearch quite a bit. Everything else I've used doesn't compare. (but again, largely preference (because its better))
Re: Ask HN: I want to write a simple webapp, how should I start?
#38Rails or Django would be easiest, IMO, and they have a ton of libraries to make the search easy. You should absolutely not have to write any algorithms or anything... whatever you choose would probably just look like ExampleSearchLibrary.new(magazine_records).search(string_from_form) and that's it. I think the hardest part is getting all the magazine data in a DB, and designing the model layer in a way that makes sense. I'm assuming it's already digital, so it would be a matter of writing scripts to scrape & save.
Re: Ask HN: I want to write a simple webapp, how should I start?
#39Re: Ask HN: I want to write a simple webapp, how should I start?
#40Personally I think it would be easier to use an embedded database such as leveldb, and build everything out with browserify, npm, and io.js. This way you can build your application as single process. The entire application can then just be streams of data and tiny modules of code that do one thing well.