Yii Framework Forum: Atomic core and packages - Yii Framework Forum

Jump to content

  • (5 Pages)
  • +
  • « First
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

Atomic core and packages

#81 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 28 April 2013 - 10:55 AM

@mindplay: I don't want to argue with you and my post wasn't about your experience, just about dependency management and if it's simple or not. Eg. Yii 1.1.13 broke some of my extensions (until I fixed 'em) just because a tiny change was introduced with table aliases.

@mike: Let's turn this around ... the problem is that we're currently using extensions, which were never developed with composer. Also there are no guidelines how to structure an extension and how to create some running examples for your extensions, maybe just because we never had a tool like composer! btw: I opened issues for not bundling Yii and the docs in the newer versions and Tony and Chris already approved it.

But the Bootstrap stuff is still the perfect example why we need dependency management and not just downloading a tar.gz and place it somewhere, eg. yii-bootstrap-editable depends on yii-bootstrap and the editable plugin, which depends on Twitter Bootstrap and jQuery, even with cross-dependencies inside and to recompile the LESS stuff for customization you'll need a (lessc) compiler which is actually able to parse all the stuff, 1.3.x in this case, not 1.4.x - which may be used by Bootstrap 3 then...
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#82 User is offline   twisted1919 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 634
  • Joined: 23-October 10
  • Location:Romania

Posted 29 April 2013 - 10:40 AM

I am very late at this party but i have a simple question since i started using composer for a while now and it makes things easier for me at least.
Right now, i use Yii as a package for composer which is nice because yii will go into the "vendor" folder in the root of my project. This also allows me to use other libraries that are not meant to be used with Yii, for instance, i use Symphony HttpFoundation component because Yii doesn't have a response class, but i need one.
The question is, with Yii's method of integrating composer, will we be still able to use other packages that are not meant for Yii?

Just another note, do not make us stick to a folder structure, this is a deal breaker for me and i am sure it is for others. I want to arrange the folders as i want(like i am doing now with Yii 1.1.x), not to be forced to do it because the framework dictates that for me.
1

#83 User is offline   Haensel 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 444
  • Joined: 14-January 11
  • Location:Vienna (Austria)

Posted 29 April 2013 - 10:52 AM

View Posttwisted1919, on 29 April 2013 - 10:40 AM, said:

The question is, with Yii's method of integrating composer, will we be still able to use other packages that are not meant for Yii?


What would be the use of composer then? It would just be a third party Yii installer. No, I'll eat my shorts if that's the case and post the pictures in here. Promise!

View Posttwisted1919, on 29 April 2013 - 10:40 AM, said:

Just another note, do not make us stick to a folder structure, this is a deal breaker for me and i am sure it is for others. I want to arrange the folders as i want(like i am doing now with Yii 1.1.x), not to be forced to do it because the framework dictates that for me.


I am more than 100% sure that Yii 2.0 won't force any app structure on you. That would be a absolute deal breaker for 80% of the Yii developers. But if you mean that you want to put composer's vendor directory somewhere else than you can use the vendor-dir option in your composer.json file.
0

#84 User is offline   twisted1919 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 634
  • Joined: 23-October 10
  • Location:Romania

Posted 29 April 2013 - 10:58 AM

@Haensel - I was just asking, maybe they want to use it only for the framework extensions/modules, i dunno, i wanted to be sure(but keep those shorts handy, you might get the chance [:kidding:] )
For the second point you got it, it's okay if we can still use what directory structure we want.
0

#85 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 29 April 2013 - 11:01 AM

@twisted1919: You're dead on. If you're working with composer and Yii 1 already, this repo may be useful for you: http://packages.phundament.com

@Haensel:

Quote

Composer is not a package manager. Yes, it deals with "packages" or libraries, but it manages them on a per-project basis, installing them in a directory (e.g. vendor) inside your project. By default it will never install anything globally. Thus, it is a dependency manager.

http://getcomposer.o...ency-management

You can handle an installation with it, but you're not forced to do so, even with Yii2 - I strongly assume. But the way the Yii2 repo will be structured is important, see also @Mike's comments.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#86 User is offline   twisted1919 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 634
  • Joined: 23-October 10
  • Location:Romania

Posted 29 April 2013 - 11:21 AM

@schmunk - Thanks allot for the link, i am going to use it.
Beside the repo, i really want to see where this composer thing goes with Yii, i hope it goes in the direction where i am thinking is going after all.
0

#87 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 29 April 2013 - 12:04 PM

I am very confident. I made so many proposals to Yii - and PRADO earlier - over the time ... and was rejected sometimes.

But Qiang and the other Core-Devs always found a solution to implement a feature in a way, which was the simplest and most flexible to think of ;)
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
1

#88 User is offline   jacmoe 

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

Posted 29 April 2013 - 03:43 PM

What I really, really like about Symfony2 is when you run the composer script to create a new project..
It's just awesome!
I hope that Yii will utilize those possibilities for it's web app generator. :)

With regards to extensions.. I'd prefer to have more control (which I'm sure I'm gonna get) because most of the time I find myself modifying extensions to suit my needs.
Only a handful of the extensions are actually installable as-is, i.e. good enough.
But I guess you can point composer to alternate repository paths - haven't really looked too much into it.
I will, though. ;)
"Less noise - more signal"
0

#89 User is offline   mindplay 

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

Posted 29 April 2013 - 06:41 PM

View Postschmunk, on 28 April 2013 - 10:55 AM, said:

@mindplay: I don't want to argue with you and my post wasn't about your experience, just about dependency management and if it's simple or not. Eg. Yii 1.1.13 broke some of my extensions (until I fixed 'em) just because a tiny change was introduced with table aliases.


Isn't that a great example of something Composer can't help you with? :-)

I'm not trying to argue with you either - all I'm saying is, Composer solves a set of problem that aren't really a problem for most developers, most of the time. Therefore, it has to be simpler than managing said problems on your own. All I've seen so far, is that things that were trivial (or at worst somewhat problematic) before, are now damned near impossible, incomprehensible, and a damned nuisance when it doesn't work as prescribed.
0

#90 User is offline   jacmoe 

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

Posted 29 April 2013 - 07:50 PM

View Postmindplay, on 29 April 2013 - 06:41 PM, said:

IAll I've seen so far, is that things that were trivial (or at worst somewhat problematic) before, are now damned near impossible, incomprehensible, and a damned nuisance when it doesn't work as prescribed.

Programmers, d'oh! :blink:

I thought that C++ programmers were the worst of the lot.

That was until I met you guys. :lol:


Having said that, I want to mention (again) that what I really liked about the Symfony2 installer script was that it did all sorts of things behind my back (or, rather: right in front of me, just hidden) like copying files, downloading packages, setting everything up, running tests, etc.
That looked rather neat.
Imagine having such neat generator scripts for Yii.

But, as Mindplay says: we don't want to complicate the heck out it. :)
"Less noise - more signal"
0

#91 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 30 April 2013 - 01:18 AM

View Postmindplay, on 29 April 2013 - 06:41 PM, said:

Isn't that a great example of something Composer can't help you with? :-)

Errr, no! :)

It is is a great example because the only thing I had to do was setting a version constraint to 1.1.12 and not reminding every co-developer of the fact, that he shouldn't use 1.1.13 for new and also for existing projects, eg. if there was an updated scheduled.
And even better, if someone would have installed an extension, which for example relies on a fix in 1.1.13, composer would have told you - in advance - that there are problems with these settings, I think that's awesome.

View Postmindplay, on 29 April 2013 - 06:41 PM, said:

I'm not trying to argue with you either - all I'm saying is, Composer solves a set of problem that aren't really a problem for most developers, most of the time. Therefore, it has to be simpler than managing said problems on your own. All I've seen so far, is that things that were trivial (or at worst somewhat problematic) before, are now damned near impossible, incomprehensible, and a damned nuisance when it doesn't work as prescribed.

We should create a poll ;) </ironic>

That depends on the workflow I guess. I've created our project templates with git in the beginning and then with git submodules to modularize them - hell, that's a mess, with far less control.

What's so intransparent and complicated with composer? It just runs git clone, git checkout 1.0.0.
Btw, I just remember this posting on composer-dev from you.
Could you give me an example of thing that's "now damned near impossible, incomprehensible, and a damned nuisance when it doesn't work as prescribed"?
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#92 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,013
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 30 April 2013 - 02:12 AM

View Postschmunk, on 30 April 2013 - 01:18 AM, said:

What's so intransparent and complicated with composer? It just runs git clone, git checkout 1.0.0.
Btw, I just remember this posting on composer-dev from you.
Could you give me an example of thing that's "now damned near impossible, incomprehensible, and a damned nuisance when it doesn't work as prescribed"?


If i understood composer right then if you run composer update (OT: which i can, because i found it quite unusual to call a executable composer.phar, so i created a symlink) it will update all installed packages to the latest version.

I can't remember that I ever needed to do this in any serious project. You hardly have to update everything! Because you have a running system that is very sensible to changes. If you really need an upgrade of a package, it will be because there's a new feature that you might need. So you upgrade that single package only. In that case you will have to check all dependencies manually anyway, because you want to make sure, that none of the changes will break your existing app.

I never had the urge to automate this - it's much safer to do that manually. You may say "But you can configure exactly which version you want for a package". Well, that's exactly what you can do with git submodules, too. And it's less hassle for your co-developers as they have one tool less to care about.
0

#93 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 30 April 2013 - 02:48 AM

Never change a running system - you don't have to update your project.
It's up to you if you want to update the whole thing or just a part of it.
My co-developers shouldn't run composer update anyway, they have run composer install which gives them all the same set of packages.

What if Yii 1.1.whatever introduces an important security fix, but the update would break your app?

Git does not know anything about dependencies, also for updating to the next stable (tagged) release you'll have to manually look up the tag or commit.
Then pull the submodule, go up, commit and push the submodule in the main project, test your app and repeat these steps for the all the dependencies which you also have to look up manually ... Until you realize one step before the finish line, that you've run into an incompatibility and have to revert everything and find another solution.

btw: Do you also don't update your OS with apt-get upgrade? ;)
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#94 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,013
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 30 April 2013 - 03:48 AM

View Postschmunk, on 30 April 2013 - 02:48 AM, said:

What if Yii 1.1.whatever introduces an important security fix, but the update would break your app?


How would composer help me here? If i let composer do it, and then find out that parts of my app don't work as they did before it requires another step to fix it: I need to figure out what composer actually did during the upgrade. If i do everything manually i always know what i did.

An OS upgrade is a different case: Here i can assume that many developers have thoroughly tested the upgrade path. In my application that's usually my job. Yii's user base is just not big enough to make sure that each and every package was tested in all possible combinations with other packages.


But anyway: I don't think we need to discuss the pros and cons of composer much longer. As long as it's optional in Yii2 everyone should be happy in the end :)
0

#95 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 30 April 2013 - 03:54 AM

Composer would just tell you this in advance, anyway.
Everything is said. Composer is optional. And that's fine.

Just the repo structure of Yii2 and extensions should be structured in a way that there's no overhead and you can use them easily also with composer.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#96 User is offline   xicond 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 34
  • Joined: 06-October 12

Posted 05 May 2013 - 11:45 PM

View PostAntonio Ramirez, on 18 July 2011 - 06:16 PM, said:

I love the idea of packages... and having a central 'official' repository -code review here is highly important, will make deployment even easier but pushing a 'lite' version to the server and then to run once to install all its requirements.

About the core, maybe is a good idea to have pre-configured those packages that are considered now as part of it (AR,WS,Widgets, etc), so to allow programmers to reduce it if some of them are not required but not to search for them, when they were always there before.


I imagine that package manager like web based CRUD gii, could check the package update version, hmmm.. quite good dreaming , hehehe
0

#97 User is offline   iletras 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 18-May 11

Posted 09 December 2013 - 12:24 PM

The "atomic core" part of this proposal really resonated with me ...
As in, why should time and power be spent loading Active Record when it won't be used?
Great idea to avoid that.
Adding needed extras in app config strikes me as a cool/efficient/economical way to go.
0

Share this topic:


  • (5 Pages)
  • +
  • « First
  • 3
  • 4
  • 5
  • 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