Welcome Guest, Not a member yet? Register   Sign In
is loading through static class is bad idea?
#13

(06-13-2017, 12:40 PM)kharota Wrote:
(06-13-2017, 11:20 AM)PaulD Wrote: Less code is not necessarily the best code (unless you are playing code golf).

Great code is beautiful because it is easily followed, clear, DRY, easily maintained, well thought out, robust and flexible.

Sir, if less code is same code why not use that one?

$this->load->view (has 17 chars)
Load::view (has 10 chars)

 how many more hours i have to do (for simple thing) if i have to go through all loading and other stuff? time is money and as freelancer its even more costly. 

I understand your point. are not we using frameworks to save our time?

If you're worried about 7 characters of typing, why not:
L::v
That's 4 characters, 6 less than your example.

Just make sure the time you save typing out 7 less (or 13 less) characters will make the code maintainable, readable, understandable and will actually save money (cause you've got to explain to every freelancer, developer, etc that, instead of using the default standard, we're doing it this way, standards exist for a reason, but if 7 characters are going to break the bank, by all means, go for it).

Frameworks save time because developers understand how they work and do not need to figure out, for example, how to display a view in the controller, they all know it is $this->load->view and they know it will work as expected without complication and for them needing to roll their own code.
Reply


Messages In This Thread
RE: is loading through static class is bad idea? - by Kaosweaver - 06-14-2017, 06:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB