optikalefx / OpenJS-Grid

OpenJS Grid is the easiest jQuery Grid ever. With very little work you can have a data grid that can do everything from sorting and searching to complex database queries. Best of all, its open source. So you can learn how it's all done.
http://square-bracket.com/openjs
MIT License
97 stars 46 forks source link

Bootstrap 3.0.3? #40

Open markc opened 10 years ago

markc commented 10 years ago

Is there any interest in upgrading to Bootstrap 3.0.3?

optikalefx commented 10 years ago

100%. Ill add it as a milestone actually. Timeline? I'm not sure, work is pretty busy at the moment. Hopefully in the next month or so though.

markc commented 10 years ago

Great, good to hear. Just looking now and I have no idea what lib/nib is or how to rebuild grid.css so maybe I could start work on converting the PHP backend scripts to PDO and make sure they work with PHP 5.5.

PHP Deprecated:  mysql_select_db(): The mysql extension is deprecated and will be removed in the future:
 use mysqli or PDO instead in /home/markc/Public/jsgrid/world-ajax.php on line 5

I see you have tagged 2.1.3 so is it safe to assume we can move towards a 3.0 version and not worry about backwards compatibility?

Also, how about I get the dev branch in sync with current master so I can send you some test requests for you to look at (if you have the time)?

Woops, sorry, another question... how committed are you to using hard tabs?

optikalefx commented 10 years ago

Yea I have someone doing a PDO conversion, but I'll probably do it myself next sit down.

Yea it's safe to move and not support back

I just pushed to the dev branch, so it should be up to date now Anything you make a PR for I'll take a look at usually in the evenings, much appreciated.

Ha, funny question. The old spaces vs tabs debate. All my text editors are set for tabs, so I'd probably opt to keep that personally. It really makes coding faster when deleting back.

optikalefx commented 10 years ago

If you wanna do PDO, you're more than welcome to. Keep it simple and easy to understand, some PDO implementations are really convoluted.

I use NodeJS now a days for a lot of projects, and I'm making a backend file for that soon too.

optikalefx commented 10 years ago

Also, lib/nib is the stylus nib library

this is nib http://visionmedia.github.io/nib/

It goes with stylus a css preprocessor http://learnboost.github.io/stylus/

markc commented 10 years ago

Ha, funny question. The old spaces vs tabs debate.

I generally try to follow these guidelines...

HTML and CSS -> https://github.com/mdo/code-guide

Javascript -> https://npmjs.org/doc/coding-style.html

PHP -> http://www.php-fig.org/psr/psr-2/

Glad you are into NodeJS. I'm setup to test both PHP and nodejs via nginx.

markc commented 10 years ago

This is no where near a pull request but if you want to have a look at what I've done so far...

https://github.com/markc/OpenJS-Grid/tree/dev

optikalefx commented 10 years ago

A couple notes so far

Awesome work so far, thanks for taking the reigns on this!

markc commented 10 years ago

Misc comments. The point of the simple config override is so my MySQL auth details don't end up in git. The db_init() function is about the simplest way I know of being able to switch between MySQL and SQLite by changing one variable ($cfg[type]). It could easily be incorporated into Grid::__construct(). It's not worth adding prepared statements until the basic 1:1 "port" actually works. For me, the main point of PDO is to be able to also use SQLite, and then the example index.html can work with near zero setup. The coding style can change, I'm so used to psr-2 that anything else just looks weird, and the error_log() statements are indeed temporary.

Hopefully I'll get the right json to return tomorrow and can proceed with adding proper prepared statements.

optikalefx commented 10 years ago

You can just opt to not commit ajax.php after you've added your credentials. The problem is that it adds 1 file, and it's a 100% guaranteed thing to change for someone else. They will download this and delete that file because they have their own way of doing the db work.

This goes for the 2nd comment too. The reason we don't need to make a function is because people will think that's what they need to do. We shouldn't do the connect in grid.php after thinking about it, because they probably have their own db connect going on already, or in their own way. So just like the above comment, we want to give them the minimal setup.

I use the grid a lot, and the first thing I do everytime is delete ajax.php. So for openJS Grid beginners, it's important that that file is SUPER easy to understand. Like line by line understand. They don't need the config override or the extra db function call. When they are learning its do this, then this, then this, then this.

If you wanna keep moving with what you're doing, I can modify it to show you what I'm talking about.

Sorry I'm a bit picky about how those demo files are setup, I try really hard to make really easy to understand code for people to pickup. One thing I hate as a developer is downloading something from someone only to have all their own ideas jammed into the demo file making it hard for me to see the 1 thing their code actually does.

ioconnor commented 10 years ago

If the sqlite/pdo is getting close and you need somebody to test it I'd be up for trying...

On Sun, Dec 8, 2013 at 10:13 PM, Sean Clark notifications@github.comwrote:

You can just opt to not commit ajax.php after you've added your credentials. The problem is that it adds 1 file, and it's a 100% guaranteed thing to change for someone else. They will download this and delete that file because they have their own way of doing the db work.

This goes for the 2nd comment too. The reason we don't need to make a function is because people will think that's what they need to do. We shouldn't do the connect in grid.php after thinking about it, because they probably have their own db connect going on already, or in their own way. So just like the above comment, we want to give them the minimal setup.

I use the grid a lot, and the first thing I do everytime is delete ajax.php. So for openJS Grid beginners, it's important that that file is SUPER easy to understand. Like line by line understand. They don't need the config override or the extra db function call. When they are learning its do this, then this, then this, then this.

If you wanna keep moving with what you're doing, I can modify it to show you what I'm talking about.

Sorry I'm a bit picky about how those demo files are setup, I try really hard to make really easy to understand code for people to pickup. One thing I hate as a developer is downloading something from someone only to have all their own ideas jammed into the demo file making it hard for me to see the 1 thing their code actually does.

— Reply to this email directly or view it on GitHubhttps://github.com/optikalefx/OpenJS-Grid/issues/40#issuecomment-30107677 .