First, thank you for your answer
Ruby is my side project language and I'm still learning and studying it. 
Rails is great and I would use it to build projects.
Roda is a learning project for me at present. I would like to dig into it. Roda is micro framework, it's much simpler than Rails. 
Thank you very much for your answer. You must be a very experienced developer, I can feel it. 
Thank you again!
------------------ 原始邮件 ------------------
发件人: "Ruby users" <andy.am@gmail.com>;
发送时间: 2022年3月11日(星期五) 晚上10:24
收件人: "Ruby users"<ruby-talk@ruby-lang.org>;
主题: Re: What's the best way to build large project using Roda ?
> Roda's tree-route makes good performance, but the tree-route means nest code that makes code hard to read.
>
> Is anybody can help me or give me some advice that how Roda build for large project ?
>
> What's the best way to build large project using Roda ?
Don't use Roda!
If you are building a new app that does not even have thousands of
users, Roda's performance claims won't make any difference. Just use
Rails instead! It enables writing code that is a lot more
maintainable, understandable, and productive, thus making it easier to
optimize database performance in the future, which is often the true
bottleneck in any web app (not the programming language or framework).
If you think your app will get millions of users, then adding more
servers for a Rails web app is cheaper than paying for developer time
to maintain Roda's cumbersome unstructured code. Also, you can always
cross that bridge when you get to it! It's considered a bad software
engineering practice to pre-optimize for the future since it weighs
you down in the present and prevents you from reaching that bright
future you pre-optimized for. There are countless failed web projects
out there due to that reason.
A lot of unskilled programmers fall for the trap of premature
optimization because many of them are not university educated in
computer-related degrees, and thus do not know how to walk before they
run, so they stumble.
Learn to be a good software engineer instead and think rationally
before you act by analyzing pros, cons, and trade-offs to avoid
falling into traps like premature optimization or blindly chasing
popular buzzwords, hypes, and bad practices.
Cheers!
On Fri, Mar 11, 2022 at 9:08 AM mark24 <mark.zhangyoung@qq.com> wrote:
>
> Thanks a lot 
>
> I will try it.
>
>
> > 2022年3月11日 下午4:26,hmdne <hmdne@airmail.cc> 写道:
> >
> > Hi Mark24, your message unfortunately got there twice. But it's all fine and on the topic and such questions are really welcome here 
> >
> > First of all, you can create methods on your App class and use them inside the route block.
> >
> > Secondly you can use a hash_routes plugin or multi_routes to split parts of your routes into different blocks (I view multi_routes more intuitive, but Jeremy recommends to use hash_routes now for performance purposes)
> >
> > And last of all, classes in Ruby are open, so you can start a class in one file and require another to continue definition (just ensure you wrap your code in `class App; end` in subsequent files)
> >
> > Please take a look at this example application you can take to start a new project: GitHub - jeremyevans/roda-sequel-stack: Application Skeleton For Roda/Sequel stack
> >
> > While the freedom you gain from Roda allows you to write unclean code, it is a freedom you gain to write a simple application in a single file. And it's still possible to make an organized application.
> >
> > On 3/11/22 03:08, Mark24 wrote:
> >> Hello Everybody:
> >>
> >> Recently, I'm intresting on ruby framework -- Roda(http://roda.jeremyevans.net/)
> >>
> >> Roda's tree-route makes good performance, but the tree-route means nest code that makes code hard to read.
> >>
> >> Is anybody can help me or give me some advice that how Roda build for large project ?
> >>
> >> What's the best way to build large project using Roda ?
> >>
> >> Thank you.
> >> Sorry for my English.
> >>
> >>
> >> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
> >> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
> >
> > Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
> > <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>
>
> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
--
Andy Maleh
LinkedIn: Andy Maleh | LinkedIn
Blog: http://andymaleh.blogspot.com
GitHub: AndyObtiva (Andy Maleh) · GitHub
Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>