Yii Framework Forum: According to these guys we are doing a lot of very bad things! - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

According to these guys we are doing a lot of very bad things!

#1 User is offline   Zorobabel 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 03-January 16

Posted 29 August 2016 - 01:23 AM

Hi there.

I started to program at college using the OOP paradigm (C++, Java). I knew there were other paradigms and design patterns but was not very interested until now that I'm trying to learn JavaScript conscientiously.

I tried to find a good direction and found these articles from Java and JavaScript "gurus":

http://www.yegor256....rogramming.html
http://www.yegor256....-is-object.html
http://www.yegor256....i-patterns.html
http://www.yegor256....ive-record.html
http://www.yegor256....ti-pattern.html
http://www.yegor256....nd-with-er.html
http://www.yegor256....code-smell.html

https://www.youtube....h?v=lKCCZTUx0sI
https://medium.com/j...ns-e78c2cf5eead

Due this I started a new journey: Learning some OOP and functional languages (like Smalltalk/Pharo, Erlang, Haskell, Clojure, etc.). I think that I need check personally what they claim, doing some stuff.

Guys, you are a great community so I want to read your opinion about what these guys say.
0

#2 User is offline   Patrick Jones 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 495
  • Joined: 14-July 12
  • Location:Berlin

Posted 29 August 2016 - 04:29 AM

The guy seems to take quotes out of context, or quotes only what fits his case.

He quotes Jeff Atwood as saying

Quote

OO seems to bring at least as many problems to the table as it solves.


but forgets to add Jeff's conclusion:

Quote

The principles of object oriented programming are far more important than mindlessly, robotically instantiating objects everywhere:

Information hiding and encapsulation
Simplicity
Re-use
Maintainability and empathy

Stop worrying so much about the objects. Concentrate on satisfying the principles of object orientation rather than object-izing everything.


OOP is an amazing tool. A tool that can be abused. But without that tool, we would be in a world of pain, a hell of 10kLOC procedural PHP scripts.
Freelance developer for hire - send me a message!
0

#3 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,184
  • Joined: 17-January 09
  • Location:Russia

Posted 30 August 2016 - 03:43 AM

Thanks for sharing. These are very opinionated posts but interesting to read. There are, of course, correct parts and not so correct parts in these. Overall, fanatical following of design patterns and even some of design principles leads you to over-engineering which is as bad as spaghetti-code if not worse.
Yii 2.0 Development Cookbook

Enjoying Yii? Star us at github

Support me so I can work more on Yii: https://www.patreon.com/samdark
0

#4 User is offline   Zorobabel 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 03-January 16

Posted 30 August 2016 - 12:54 PM

View Postsamdark, on 30 August 2016 - 03:43 AM, said:

Thanks for sharing. These are very opinionated posts but interesting to read. There are, of course, correct parts and not so correct parts in these. Overall, fanatical following of design patterns and even some of design principles leads you to over-engineering which is as bad as spaghetti-code if not worse.


I agree again. I'd rather be balanced.

And I will share this final link:

https://medium.com/@...st-cddaf29fee37

Warm regards.
0

#5 User is offline   Jean Sustersich 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 29-December 16

Posted 24 January 2017 - 09:17 AM

Thanks for sharing all these. Some good topics.
0

#6 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 3,694
  • Joined: 10-October 10
  • Location:Denmark

Posted 24 January 2017 - 11:04 AM

View PostZorobabel, on 29 August 2016 - 01:23 AM, said:

Due this I started a new journey: Learning some OOP and functional languages (like Smalltalk/Pharo, Erlang, Haskell, Clojure, etc.). I think that I need check personally what they claim, doing some stuff.


I was about to suggest that you try functional programming languages, but then I took another look at your post ..

Looks like you already have begun walking that path :)

Which is great.

JavaScript.. that's is a crazy scene! Posted Image

When I program, I try to resist the temptation to over-engineer.

These days, I rarely use (or write) Yii extensions, and I can get away with it because Yii uses Composer.

I don't need, or want, generalized code when my needs are specific.

The current rage of the JavaScript community is to be 'reactive' - whatever that means.

I guess it means that JavaScript finally got proper support for Object-Orientation, and thus people want something different, like functional programming.

PHP is here for those of us who are not fashionistas. Posted Image

One thing that I like about the newest trend in the JavaScript community is the return to smaller frameworks and the idea of un-coupled, functional code.
But, it is just an idea.
Not religion. Not a silver bullet.

This reminds me of C++ in the 90's when OO was new and 'everyone' went totally crazy with huge inheritance hierarchies.

Now even C++ programmers are getting into the functional (reactive?) "mindset".

In the end, I think, we should focus on what suits our problem domain the best.
And try our best to resist our urge to over-engineer.

And avoid following any shady cult leaders. Posted Image


EDIT:

Currently, I am working towards having a good handle on the following programming languages:

C - (c11) - this is elegant and immensely powerful. And widely used. And you are able to write in either OOP or functional style.

Racket - this is a Scheme that is mature, has batteries included, and a good alternative to Lisp. Carmack is using Racket, so why not?

Rust - a safe version of C. Much harder to learn, but I think it is going to be worth the effort.

Python - high level language that does everything. It reads well, too.
"Less noise - more signal"
0

#7 User is offline   Zorobabel 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 03-January 16

Posted 28 January 2017 - 01:36 AM

@jacmoe, these are fantastic tips! Thanks for taking the time to answer this post
1

#8 User is offline   mmx 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 77
  • Joined: 20-June 11
  • Location:Virginia Beach, VA USA

Posted 02 June 2017 - 02:53 AM

View Postjacmoe, on 24 January 2017 - 11:04 AM, said:

JavaScript.. that's is a crazy scene! Posted Image

:unsure: A spent a month experimenting with the Meteor full stack framework using Aurelia on the client side. The lack of relational SQL support or rather requirement for use NoSQL database engines was my main turn off. Things are changing in the Javascript world as far as OOP support goes, but I would tend to agree that the JS crowd marches by a different drummer.
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users