Welcome Guest, Not a member yet? Register   Sign In
Poll: You need a PHP Library for Twitter Bootstrap?
You do not have permission to vote in this poll.
Yes
28.57%
6 28.57%
No
66.67%
14 66.67%
I do not know
4.76%
1 4.76%
Total 21 vote(s) 100%
* You voted for this item. [Show Results]

[POLL] PHP Library for Twitter Bootstrap
#1

(This post was last modified: 12-02-2015, 12:09 PM by condor.)

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?
Reply
#2

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.
Reply
#3

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.
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Reply
#4

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.
Reply
#5

For somebody that is going to switch to a template engine such a library probably would be an obstacle.
Reply
#6

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?
Reply
#7

(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.

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.

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. Smile
Reply
#8

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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB