Welcome Guest, Not a member yet? Register   Sign In
CI and GNU/Autotools
#1

In the past months I been asked for a number of small website with one or few pages (usually those doesn't even use a db), apparently trivial where (IMO) a full CI installation may be excessive, still those trivial websites often have at least a contact page, meaning a form submit, sanitization, validation, ajax & non ajax error handling and some basic sendmail functionality... I thought a framework would be still handy, and I don't see any reason to use any other but CI.

The result (I just started today is currently more a proof-of-concept) is a setup of a configure.ac and few automake.am files which most *nix users should know already, to configure and install only what is needed.

Obviously in time I plan to cover the whole CI's sources. Theoretically should be trivial add some (optional) patch before installing (eg: I plan to join mandatory core files into one and/or trim away more unused code), or drop-in autotools ready sub-directories to add third-party patches/implementations to be configured and installed.

How do you think?

https://github.com/xenogenesi/codeigniter-configure
Reply
#2

I think it's a cool idea, but you'd need some pretty hefty tests to make sure you still have a stable environment when it's done removing code. I hate to say it, but, despite using Linux 5 days a week and OS X for home use (and using Linux off and on for almost 20 years), I'm not familiar enough with GNU/Autotools, makefiles, etc. to figure out everything that's going on there without spending some time pouring over documentation.

One thing I did want to point out, though, is that the only real benefits to joining the files are for distribution (and most modern methods of distribution would minimize the benefit there) and obfuscation. On most sites, the difference in speed between loading 1 file vs. multiple files will be negligible, and you'd have to modify the loader (and a few other classes/functions) to deal with the change in location when loading the classes in the combined file(s).
Reply
#3

(08-20-2015, 08:56 AM)mwhitney Wrote: I think it's a cool idea, but you'd need some pretty hefty tests to make sure you still have a stable environment when it's done removing code. I hate to say it, but, despite using Linux 5 days a week and OS X for home use (and using Linux off and on for almost 20 years), I'm not familiar enough with GNU/Autotools, makefiles, etc. to figure out everything that's going on there without spending some time pouring over documentation.

Even with the minimal version currently extracted, CI give a good feedback on errors, when some file is missing, adding it is easy if you know a bit of make and shell syntax, what maybe annoying is re-run the autotools to re-generate the auto-files if you have to add a lot of files/options in a short time, but as a user (once the whole CI sources will be covered) you shouldn't deal with the autotools internals, just know how to use configure at the command line, the target of this project is to make easy to install CI with (only) the features your project need, think of it like one of the online configurator (and eventually may be done) like for jquery-ui or bootstrap just to mention some.

If you need an external third party as an option you may just create an issue on github with the request to get it integrated (or you may fork and try to add it yourself).

configure.ac and makefile.am are less complex than they look, in big C/C++ projects they may get ugly but this shouldn't be the case, currently "make" copy from the sources to the current build directory, "make install" copy from the build to the target directory, that's it, the configure options are just a filter telling which files to copy.

(08-20-2015, 08:56 AM)mwhitney Wrote: One thing I did want to point out, though, is that the only real benefits to joining the files are for distribution (and most modern methods of distribution would minimize the benefit there) and obfuscation. On most sites, the difference in speed between loading 1 file vs. multiple files will be negligible, and you'd have to modify the loader (and a few other classes/functions) to deal with the change in location when loading the classes in the combined file(s).

I emphasized too much about joining files, was just an idea for some of my current projects (something I did in the past with non CI code), beyond the real target of this project, and you're right, probably is just too much effort for no real benefits.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB