dimitarvp

dimitarvp

Different ways of structuring code - what do you think is best?

“How to make and maintain a project in framework X with the minimum amount of files and boilerplate” :smiley:

Most Liked

Ted

Ted

This was one of the main problems with the first popular MVC web framework for Java: Struts1.

It’s hard to understate how popular Struts1 was in the Java community circa 2003.

Therefore, it grew rapidly and organically, and unfortunately this resulted in all roads leading to struts-config.xml.

The file could balloon to thousands of lines, especially if you wanted readable XML, and merge conflicts were a constant source of worry on larger projects.

Exadra37

Exadra37

Well with the minimum amount files resonates to me as that huge files of code that do not separate concerns and actions.

I am not really a fan of one file to handle all the actions one a resource, but this is often the case, but what pisses the heck of me is when the files goes to the thousands of lines and deals with many resources… it’s just a nightmare and a sink hole of our time :wink:

But probably the minimum amount of files you are referring to are not related with the code for the project itself?

AstonJ

AstonJ

^^ Sounds like a good topic for a thread :smiley:

Rails championed a simple MVC structure which many frameworks also adopted. However I really liked Volt’s idea of building your app as a series of components. Something that bugs me is when I am working on something then have to jump to various folders. I know editors like Vim can make it easier but sometimes I just want to use the side panel file browser to get where I want to.

Where Next?

Popular General Dev topics Top

Devtalk
Reading something? Working on something? Planning something? Changing jobs even!? If you’re up for sharing, please let us know what you’...
1033 17470 383
New
chasekaylee
Hi everyone! I have been in the professional industry for ~2 years now coming from a boot camp. I started a base foundation by programmin...
New
jaywengrow
Hello! It’s Jay Wengrow, author of A Common-Sense Guide to Data Structures and Algorithms. My book now has a supplemental website, where ...
New
mjk
TL;DR: words that incorporate negation are acceptable, eg. independent, asymmetric, nondeterministic. An example in the book is to renam...
New
New
dwaynebradley
In their weekly newsletter, Jared Santo from the Changelog shared this blog post by Mark Ericksen over at fly.io: What is really inter...
New
AstonJ
Do we have any digital nomads here? Anyone fancy it? If so, which countries would you consider? I’ve been toying with the idea for a wh...
New
jaeyson
Hi!, hope everyone’s ok. Sorry if this question is ambiguous (i’ll remove this if i break some rules here). This is more like a self-ques...
New
ivanhercaz
Hi! I usually keep changelogs for my projects because I think they are really useful, not only to track the changes and not to be lost b...
New
harwind
I’m working on a C++ program where I need to convert a string containing a numeric value into an integer. I want to ensure that this conv...
New

Other popular topics Top

AstonJ
What chair do you have while working… and why? Is there a ‘best’ type of chair or working position for developers?
New
ohm
Which, if any, games do you play? On what platform? I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
New
AstonJ
Or looking forward to? :nerd_face:
New
siddhant3030
I’m thinking of buying a monitor that I can rotate to use as a vertical monitor? Also, I want to know if someone is using it for program...
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
PragmaticBookshelf
Author Spotlight: Tammy Coron @Paradox927 Gaming, and writing games in particular, is about passion, vision, experience, and immersio...
New
Fl4m3Ph03n1x
Background Lately I am in a quest to find a good quality TTS ai generation tool to run locally in order to create audio for some videos I...
New