6 ms·
How a rails/ruby buy should start with python/django?
by claudiug 9y ago
How a rails/ruby buy should start with python/django?
- est 9y agoYou don't. Web framework these days are irrelevant IMHO. There are no land-sliding advantages between frameworks. Pick up what you most familiar with, get job done ASAP.
- dethos 9y agoI must agree with you. Between these 2 frameworks, even though they have their differences (and lots of them), they are mostly equivalent. My recommendation these days goes like this: If you are more familiar or prefer Python use Django. If Ruby is your thing, go with rails. Of course this rule has its own exceptions.
- cies 9y agoDisagree. Choose wisely, which means sometimes a FW you're not familiar with (but has some features that fit well with your problem/domain). Like strong typing (Haskell), or actor model (Erlang/Elixir), or extreme speed/efficiency (compiled languages), or a "better JS" (Elm/PureScript/ReasomML). > get job done ASAP. But having maintainable/hackable/refactorable code is really nice too! IMHO, nowadays PhpWithFrameworkOfChoice+jQuery is not a very defendable choice for a greenfield "SPA".
- unoti 9y agoTwo answers for you: 1) don't-- instead learn about making single page apps on the front end using React and Redux, or perhaps Angular 2. Then write a REST backend in either Node, Go, Python, or C#. Or go serverless and write the backend in Firebase. 2) if you really do want to do Django, start by doing the default tutorial that focuses on building something in the admin interface. Coming from a rails background you are on somewhat similar ground.
- orf 9y agoDjango is an excellent choice for writing a REST backend though.
- code_chimp 9y agoIt definitely can be, but for myself I find it easier to use Flask for that particular case.
- poisonborz 9y ago1) -> Yeah sure. Without knowing what the project is about, this approach will surely cover all bases. /s
- unoti 9y agoI've already put about 10x the effort (based on character count) into answering the question than the person put into asking it. I wasn't actually attempting to cover all the bases; that'd be a few books and blog articles. If the goal is to learn Django, then the basic tutorial is a great place to start, especially for a Rails engineer. If the goal is to build something from scratch in 2017, Django is probably not good choice for someone that's already a Rails expert. Django would be a great way to set up an admin interface and rapidly get a CRUD interface going for an app of 20+ inter-related tables going. But the OP is already a Rails engineer, and in the modern world they're not going to be gaining much. Django is indeed a nice way to make REST backends, but so is Rails. If the idea is to learn something new for an existing Rails engineer, then single page apps are a good choice or some other way to make backends (such as Flask) would be a superior investment of time.
- spapas82 9y agoAnswer 1) is plain wrong. I don't think that more than 10% of all web applications will benefit from SPAs. Your recommendation stands only for valley companies that have money to burn. For example, in my industry (I work on the public sector) SPAs are never needed. Good old traditional request/response web apps, maybe with a little jquery on top to make things more responsive or add some advanced controls (autocompletes, keywords etc) are perfect for the job. An experienced django developer can create a full traditional multi-user CRUD web app in a couple of hours. You'll just create the models and a couple of CBVs and everything else will be auto-created (but not magically created) through django-forms, django-filters and django-tables2. Now, how much time would you need to duplicate this functionality with an SPA? As I said, if you have money to burn then this is the way to go - on other cases, just use Django.
- unoti 9y ago> Answer 1) is plain wrong. I don't think that more than 10% of all web applications will benefit from SPAs. Your recommendation stands only for valley companies that have money to burn. Actually it's very easy to put together a single page application today! Really easy, really fast, really practical. I'll lay out the basic steps below. But before that, an important note: several years ago, what you said was totally true. In, say, 2013, it would have been a big piles-of-cash-burning exercise to make a single page application. Today, though, it's actually quite simple, fast, and productive to create and deploy a single page application. Here are the basic steps, assuming you're using Angular 2 for example. 1) Generate your application. This is a single command line command. 2) Edit it a little, add a text box and some buttons. 3) Deploy it to google app engine; this is a single command line command, too. The time investment is in learning how to write apps with Angular 2 or React. That is indeed a big learning curve, but it's way easier today than it was years ago. Angular 2 is way easier to write apps in than Angular 1 was. Deployment is easier than it once was. My real thesis here is that today is a good day to embrace the modern web and try things a new way-- single page apps are actually much more straightforward and practical than they were years ago. I totally agree that if your goal is to build a crud app for a client then Django is likely a superior approach. But if you're already a Rails developer that wants to learn something new, then SPA is a better investment of time than Django.
- infecto 9y agoI agree and disagree. I think API first and some form of a SPA is insanely powerful and probably the way to go for most larger scale projects. For everything else there is a lot of things that can be solved from a simple templating system. Sure its not as sexy but for a lot of the business cases you really don't need a sexy interface. My favorite example is the bloatware that is Asana. I would be 10x happier if it was a using simple components written in JS but not the whole app hiding inside of a bloated SPA.
- pspeter3 9y agoWhere do you draw the line on larger scale projects? Also how do you handle optimistic updates for things like drag and drop?
- i_am_nomad 9y agoThe tutorial on the Django.org site is quite excellent. You'll also want to learn a few important extensions, like django-extra-views and djcelery.
- fancy_pantser 9y ago> Previous versions of Celery required a separate library to work with Django, but since 3.1 this is no longer the case. Source: http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html http://docs.celeryproject.org/en/latest/django/first-steps-w...
- spapas82 9y agoDjango has a great ecosystem of addon packages covering all your needs: Here's a nice grid of all these packages: https://djangopackages.org/ https://djangopackages.org/ And a list of packages I use on (almost) all my projects: * django-filter * django-tables-2 * django-auth-ldap * django-reversion * django-compressor * django-crispy-forms * django-autocomplete-light * django-extensions * django-rq * django-taggit * django-rest-framework (if REST API is needed) I always wanted to write a blog post about these packages but never have been able to find the time :/
- tonyedgecombe 9y agoI've been impressed with all of the Django documentation.
- phasnox 9y agoThe best way to get to a new scripting language/framework is by doing. In spanish we have a term for this: "Hacer camino al andar", which translates to "By walking you make a path". Grab a small project(like a todo list), modify it and try to enhance it. I guarantee you will learn more from this than a thousand tutorials.
- Doman 9y agoReally nice tutorial is being made here: https://simpleisbetterthancomplex.com/series/beginners-guide/1.11/ https://simpleisbetterthancomplex.com/series/beginners-guide... Author uses recent version of Python and Django and is building with You something useful.