[POLL] PHP Library for Twitter Bootstrap - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: [POLL] PHP Library for Twitter Bootstrap (/showthread.php?tid=63722) |
[POLL] PHP Library for Twitter Bootstrap - condor - 12-02-2015 Hello! I want to conduct a small survey among members of the Community Codeigniter. In Codeigniter have assistants to work with html, forms. Very useful helpers. More recently, however, I encountered a problem where I need to work a lot with Twitter Bootstrap. I need to write a lot of code for an unusual project. Helpers for this task is not entirely suitable. So I decided to write a special php library to work with Twitter Bootstrap. The library will include a set of methods to generate html code for Bootstrap. Example: PHP Code: $this->bootstrap->button(' This button'); Code: <button class="btn btn-default" type="submit">This button</button> PHP Code: $this->bootstrap->button(' This button', array('type'=>'primary')); Code: <button type="button" class="btn btn-primary">This button</button> PHP Code: $this->bootstrap->button(' This button', array('type'=>'success', 'size' => 'large')); Code: <button type="button" class="btn btn-success btn-lg">This button</button> And so on. It would be useful to you such a library? RE: [POLL] PHP Library for Twitter Bootstrap - kilishan - 12-02-2015 I voted no - but only because I don't use the helpers for generating HTML. I prefer to write HTML as HTML. For forms, I only use the select* methods and form_open/form_close. If I did use the helpers, then yeah, something like that would probably be useful. RE: [POLL] PHP Library for Twitter Bootstrap - albertleao - 12-02-2015 Not a fan of putting so much php in the front end. This would be especially annoying if you tried to get a front end developer (angular or ember) to work on the front end. I've worked with several front end devs that use bootstrap but don't know the first thing about php. It's better to keep things separate in my opinion. RE: [POLL] PHP Library for Twitter Bootstrap - cartalot - 12-02-2015 i am a huge fan of twitter bootstrap. i use it in everything. that said i would not want it part of codeigniter. because twitter bootstrap does breaking changes between versions. which is great because of the improvements to bootstrap, but would not be great if codeigniter had to support multiple versions of a front end framework. however i'm very excited about what can happen combining codeigniter with twitter bootstrap, especially for forms. i've actually been working on methods that basically combine bootstrap, with codeigniter form helper, set value, and form validation. result: creates complicated forms and validation efficiently, and bootstrap makes sure it works well on mobile. so please post your library etc in a different thread -- i'm sure there are other people using bootstrap so we can help each other. RE: [POLL] PHP Library for Twitter Bootstrap - ivantcholakov - 12-02-2015 For somebody that is going to switch to a template engine such a library probably would be an obstacle. RE: [POLL] PHP Library for Twitter Bootstrap - Martin7483 - 12-03-2015 The form helper that comes with CodeIgniter has methods for generating things like buttons and inputs. And you can provide CSS id's and classes. So why create your own? RE: [POLL] PHP Library for Twitter Bootstrap - condor - 12-03-2015 (12-02-2015, 12:52 PM)kilishan Wrote: I prefer to write HTML as HTML. For forms, I only use the select* methods and form_open/form_close. If I did use the helpers, then yeah, something like that would probably be useful. I also prefer to write pure HTML. I use helpers, too rare, except in certain situations. (12-02-2015, 12:56 PM)albertleao Wrote: Not a fan of putting so much php in the front end. This would be especially annoying if you tried to get a front end developer (angular or ember) to work on the front end. I've worked with several front end devs that use bootstrap but don't know the first thing about php. It's better to keep things separate in my opinion. Yes, indeed, here I understand that this is a problem for fronend developer. Since such a library will be designed entirely on the backend developer. (12-02-2015, 02:35 PM)cartalot Wrote: i am a huge fan of twitter bootstrap. i use it in everything. I also like twitter bootstrap. Validation of fields, I also have been thinking. At this point I also use a Class Validation. When I have a library, then I share it with the developers. (12-02-2015, 03:40 PM)ivantcholakov Wrote: For somebody that is going to switch to a template engine such a library probably would be an obstacle. Yes, I thought about it. (12-03-2015, 02:24 AM)Martin7483 Wrote: The form helper that comes with CodeIgniter has methods for generating things like buttons and inputs. And you can provide CSS id's and classes. So why create your own? Such a library is convenient for non-standard solutions, where a huge amount of code. It will help a lot faster and more efficient to work with twitter bootstrap. I value all opinions. if I write a library, then share it on github and forum in this thread. RE: [POLL] PHP Library for Twitter Bootstrap - kilishan - 12-03-2015 While I'm not a fan of using them personally, I understand the need in certain situations. I have even created (or at least started) one called UIKits as part of Sprint that allows you to use one template and swap out CSS frameworks. If people are serious about making libraries for this, something along these lines might be worth looking at. |