If there is an advantage, what is the main technical advantage?
Reply content:
The instructor of my internship (pure Aries @ Breeze) said this question to the intern in the first class, probably meaning: the more your application is done, the less things the framework can offer you. The new framework will lead to a great increase in efficiency at the start of development, but when it comes to development, it will become less useful and more of a design.
This is probably the reason, watercress is still using Quixote, because in addition to routing distribution, the other parts of any framework has not provided much help. The framework provides the working mode of the framework.
So I think for the general application, if you can get the efficiency advantage from the frame, then Ruby on Rails or Django, who a little bit less relationship is not very big. Instead, the quality of the document, community activity, the number of users with quality (that is, the number of users who can really solve the problem in StackOverflow or mailing lists), these non-technical factors will have a greater impact. There are certainly differences and advantages between frameworks and frameworks.
such as Spring's transaction management. Like a quick prototype of Rails. In addition, "some frameworks for light frame Quixote,sinatra,node", even "without frames",
is also a framework.
The choice of framework, it should be said that not the technical staff to consider the problem (modern language differences, sometimes small to not worth mentioning). Architects need to consider these.
Considering the cost of Scalability, is it cheaper to manage things with Spring's server clusters than on ORACLA clusters?
Consider a quick prototype, can you use Rails to get a usable item within one months to see VC?
Consider the need for users to have mail template editing and automatic distribution, because PHP has a ready-made product, is it preferable to choose him?
Considering that the system involves a large amount of personal data, are security-based considerations for choosing a Java framework?
When the requirements are more diversified, it may also be necessary to mix multiple frameworks.
Spring's API + Rails?
If there is a lot of concurrency for simple things, do you consider joining Node?
If you have a simple index of large amounts of data, do you consider a NoSQL database?
For different libraries in multiple languages, is it important to consider using Python as a binder?
Today's hybrid framework is common. In the future, the language and the framework may also be difficult to show great unity. Since everyone accounts for poor, it is wise to choose according to the demand combination. Ruby doesn't split up like any other community.
Ruby has a great advantage in DSL. The rspec used for testing are very useful. Automated testing is very important, there is no test, many things can not be done at all.
Meta-programming. Python programmers seem to reject this, and Ruby thinks it's a good thing.
Django's source code is long, and the longer it is, the more difficult it is to read. Boss asked me to add a method to the many to many table, I remember I changed at least 3, 4 places to change this method (do not rule out my methods have problems). Think of the ideal state as long as the change of a place is good.
Berkeley said development chose rails, and in Berkeley's previous course there was no ruby at all. And Berkeley CS61A, AI, are learning python.
Berkeley in the book Software as a service this course says
Why Ruby and Rails? Why isn't Java, C + +, Python, or Scala?
We want students to understand this in the real world, programmers is rewarded
Not for the number of lines of code writtenor for
How quickly they can "bash out" a featureFunctionality delivered with high assurance of stability and while keeping the codebase
beautifuland
maintainableFor
continued growth. To many students, especially "hotshot" coders who come into a software engineering course with nontrivial programming expe Rience, the methodologies and techniques we do this-
Design Patterns, refactoring, test-first development, Behavior-driven design-seem a strange and a dubious use of time.
We have found that students is more likely to gradually embrace these practices if given the
Best possible tools-to-support the practices.The Rails community have created by far the most
Seamless, elegant, and comprehensive tool set to support Agile and XP,And the idea of constantly refining and inventing tools, testing as well as helping produce beautiful Applicat Ion code is a distinguishing characteristic of the Ruby developer ecosystem. While learning Ruby and Rails would be new to most students, juniors and seniors seem to learn it without difficulty, and F AR Superior tools outweigh the learning costs.
A common counterargument in Academia are "our curriculum already teaches language
X, so upper-division courses should leverage that knowledge. " We believe this approach optimizes for the wrong thing. First, software professionals is routinely expected to learn new languages by applying concepts from languages they alrea Dy know, so "learning-Learn" new languages is a good skill to cultivate in class. Second,
a language that makes it difficult to write and test beautiful and concise code was a poor vehicle for teaching those T Echniques,So the-investment being "leveraged" is syntactic knowledge, a hurdle surmounted with relative ease. Thus, even if we students never use Ruby again, they'll has learned how to
Reduce to PracticeSuch important ideas as
metaprogramming, Higher-order programming, functional programming, and use of closures in the service of higher produ Ctivity and more maintainable code.We believe these skills would transfer to new languages, framework, and programming systems. Our survey of alumni of the course so led to this book (see Chapter) suggests, we belief is well founded. From a software life Cycle, a little advantage is not, just early development efficiency faster, software later optimization, performance improvement, that do what still have to do what, that point of workload can not run. In terms of web development efficiency (this is just the web), I personally feel that there are advantages over Python's web framework, and there are about three things in particular:
in Language
While Ruby and Python resemble each other in many ways, there are a number of differences, in general Ruby is more flexible than Python (especially meta programming), so Ruby makes it easier to create expressive frameworks, The framework also makes it easier to get more overhead out.
Design on
Rails is a typical c2c,convention can speed up development efficiency (of course there are all kinds of drawbacks), and Python advocates explicit, so to write more code, and not so many magic, but learning easier, not careless make mistakes.
on the ecological system
Ruby almost entire community is focused on the web development, and focused on rails, so many new idea is created (Cucumber, capybara, Sprocket, Capistrano/mina), and gem/ Bundler makes package management easier and ecosystems more developed. In Python, Django has its own ecosystem, but there are many other frameworks, resources scattered, and other frameworks that are hard to struggling, plus Python's other big applications are scientifically calculated, so the web-based ecosystem is less developed than Ruby. Rails is the fastest in the development of small web sites. Rails can be automatically generated in less than a minute. The integrated solution for rails that is not available in other frameworks encapsulation is a paradigm of social programming plugins and extensions far beyond the framework solutions and materials are very rich Ruby's sophisticated meta-programming mechanism, which is admired in other languages, is destined to be more intelligent than other frameworks
The disadvantage is also obvious that integration too high will lead to bloated and degraded site size need to rely on the architecture of the Ruby community has developed several thin and high-performance frameworks such as Sinatra Railsapi and other languages are learning and imitating the rails gap is not a big deal
Another drawback is that the domestic cloud platform basically does not support the historical reasons of Ruby, with the expansion of domestic PHP and the rise of Nodejs rails has missed the best development period in China as for the future of rails can again fire Just look at how 37signal companies and communities face the new HTML5 wave. I prefer python. Flexible. Great advantage. Rails can quickly make products online, and rails provides a complete framework and best practices. This is not comparable to the Python framework. One thing I feel good about is the database Migration (migration) feature, rails is self-contained, and other Python frameworks are implemented via plugins (Django is implemented in the core functionality in version 1.7, and is still under development migrations | Django Documentation
)