Yii Framework Forum: Namespaces in Yii 2.0? - Yii Framework Forum

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • This topic is locked

Namespaces in Yii 2.0? Rate Topic: -----

Poll: Namespaces in Yii 2.0? (140 member(s) have cast votes)

will use of namespaces make better Yii?

  1. yes (101 votes [72.14%])

    Percentage of vote: 72.14%

  2. meaby (18 votes [12.86%])

    Percentage of vote: 12.86%

  3. no (11 votes [7.86%])

    Percentage of vote: 7.86%

  4. how will it help? (will learn it) (10 votes [7.14%])

    Percentage of vote: 7.14%

Vote

#41 User is offline   mindplay 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 397
  • Joined: 03-September 09
  • Location:New York

Posted 18 February 2012 - 10:57 AM

I guess I have more or less the opposite point of view.

In my opinion, a framework should be built for the latest generation of the technology it's designed to enable - leveraging every available feature of the platform, using the latest tools and best practices available.

If you design for last year's technology, you're designing for the past. I would rather design for the future. There are already projects (such as Aura) designed exclusively for PHP 5.4.

In a sense, PHP has been playing "catch-up" with many other languages for years - PHP 5.4 will provide a number of features that developers have been starving for since forever.

Because the language itself has finally "grown up", adoption by developers is going to be high - it's already happening, and it hasn't even officially been released yet. This will put pressure on hosting-companies pretty quick.

I think you will see much more wide-spread and quicker adoption of PHP 5.4 than previous versions.

Just my opinion :-)
0

#42 User is offline   phpnode 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 141
  • Joined: 18-April 11

Posted 18 February 2012 - 01:04 PM

View Postmindplay, on 17 February 2012 - 05:42 PM, said:

or encourage adoption of PHP 5.4? :-)


ha ha.... no, it will just drive people away from Yii
0

#43 User is offline   phpnode 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 141
  • Joined: 18-April 11

Posted 18 February 2012 - 01:20 PM

View Postmindplay, on 18 February 2012 - 10:57 AM, said:

In my opinion, a framework should be built for the latest generation of the technology it's designed to enable - leveraging every available feature of the platform, using the latest tools and best practices available.


Disagree, a framework should target the most widely available version of the platform it's building on, in this case 5.3, otherwise you are presenting barriers to entry. We want Yii to take over the world, not be restricted by artificial constraints such as requiring the absolute latest version of PHP.


View Postmindplay, on 18 February 2012 - 10:57 AM, said:

There are already projects (such as Aura) designed exclusively for PHP 5.4.


And this project will remain inaccessible to a large proportion of the PHP community for YEARS, it has zero mindshare and will be crippled by this requirement for the foreseeable future.

View Postmindplay, on 18 February 2012 - 10:57 AM, said:

In a sense, PHP has been playing "catch-up" with many other languages for years - PHP 5.4 will provide a number of features that developers have been starving for since forever.

Because the language itself has finally "grown up", adoption by developers is going to be high - it's already happening, and it hasn't even officially been released yet. This will put pressure on hosting-companies pretty quick.

I think you will see much more wide-spread and quicker adoption of PHP 5.4 than previous versions.


I think you're being a little optimistic, while I agree we should see faster adoption than for 5.3, it will be by no means instant. Think years not months. For most businesses it's basically irresponsible to switch to a new major PHP version before it's had at least a year's worth of critical bug fixes, think 5.4.4 not 5.4

Also, I'm not really sure what you're arguing for. Traits do not provide the same functionality as behaviors. Afaik you cannot attach a trait to an object at runtime in the same way that you can a behavior, nor can you temporarily disable or selectively enable a trait. As mentioned above you're free to use short array syntax in your application code, so does it really matter that the Yii2 code uses the normal array syntax?
0

#44 User is offline   andy_s 

  • Random Member Title
  • Yii
  • Group: Moderators
  • Posts: 1,526
  • Joined: 22-June 09
  • Location:Russia, Kostroma

Posted 18 February 2012 - 02:08 PM

I think it is already decided Yii's PHP version requirement will be 5.3? No need to argue about it :)
0

#45 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 18 February 2012 - 04:13 PM

There is nothing earthshatteringly new in PHP 5.4 versus 5.3.
5.3 in itself was a major leap, though.
"Less noise - more signal"
2

#46 User is offline   Kynao 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 06-September 10

Posted 23 April 2012 - 07:46 AM

View Postphpnode, on 18 February 2012 - 01:20 PM, said:

ha ha.... no, it will just drive people away from Yii.
Disagree, a framework should target the most widely available version of the platform it's building on, in this case 5.3, otherwise you are presenting barriers to entry. We want Yii to take over the world, not be restricted by artificial constraints such as requiring the absolute latest version of PHP.


Didn't understand this, isn't it the role of Yii 1.x to embrace, take over the world ? It did it and it continues to do it. People would still have choice between the long matured actual Yii releases line and the new innovative major release.

Long time ago, Yii were used to be seen as an innovative framework, things are changing (for good or bad, whatever, that's not the subject) and i don't know why as i don't see "to be innovative" as "to be against productivy". If i don't make mistake, i think Yii clearly has the longest development cycle i've seen among php frameworks regarding major releases. That means the choice for a php 5.3 support will stay for a very, very long time... and as a result would reinforce what becomes to look like to always be one step behing everyone at least.

Clearly, if not the majority of frameworks are not supporting php 5.4 when yii 2 will be out, point me this post :) (or Yii 2 will be released far sooner than i think) and as they have, as mentioned, a shorter major release development release, they will even be under a new php release while we will stay with php 5.3 for still a long time coming after that.

As well as constraints, did Yii already restrict people by artificial constraints with previous php releases ?
Regarding PHP release and Yii 2, and as Yii 2.0 is so far from now, we will probably have PHP 5.4.x releases before and i don't see them as constraints, especially if we take into account php itself has not a very fast development cycle.
0

#47 User is offline   bluyell 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 222
  • Joined: 28-October 11

Posted 15 May 2012 - 10:21 PM

In java world, the namespace will help you very much in code organization layering all your code. When you learn java you are encourage to learn the framework usage in a namespaced environment, from beginning....this is my point: introducing namespacing in yii NOW will confuse many people who learn Yii starting from a non-namespaced yii version, many projects will be affected without serious modifications.
0

#48 User is offline   Morne Gouws 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 23-September 11
  • Location:South Africa

Posted 16 May 2012 - 06:09 AM

Namespaces are great, but even with extensions and modules you always 'extend' from another class, therefore you wouldn't really need it for that case.

If you do however have multiple projects running from the framework (which should cause an issue in the first place) You could use namespaces to make things easier, though in our office we are debating whether that would not make things more complicated.

Quote

By the way in Visual Studio it supports namespaces by Intellisense Tools.


Majority of php developers use tools that doesn't even use Intellisense, and the tools that does support it (ex. PHPeD, Aptana ect..) - You barely use
0

#49 User is offline   harmar 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 13-July 12

Posted 19 July 2012 - 05:16 PM

I agree namespaces would be great, makes the code a lot cleaner, and you know where things belong
0

#50 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 29 April 2013 - 03:45 PM

I think this topic deserves to be closed, as it has served it's purpose.
Namespaces are in Yii 2.
"Less noise - more signal"
0

Share this topic:


  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • This topic is locked

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