3 ms·
Implicit code is great for frameworks. The kinds of things you have to do over and over again and a lot of the things Rails is great at. Create a database tabl
by malyk 9y ago
Implicit code is great for frameworks. The kinds of things you have to do over and over again and a lot of the things Rails is great at. Create a database table, link it to an ORM, take params from a POST request, save them to that table...all that stuff should be pretty vanilla and absolutely yes, convention over configuration is amazing for that.
Explicit code is great for business level logic. In any business, and especially startups, things are changing so frequently that there's often very little in the code that could be set up as a convention and the accompanying "magic" that has to make it happen. Sales processes change weekly. Frontend features change daily. Reporting needs can change hourly.
In those environments you have to be able to quickly look at the code and see/know exactly what it is doing now and why so that you can be better able to make changes without introducing defects. Testing helps this a lot, but succinct, readable, explicit code makes life so much easier.
Implicit for frameworks; Explicit for business.