Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
start [2019/03/01 22:07]
127.0.0.1 external edit
start [2019/06/17 20:27] (current)
Line 1: Line 1:
-==== Splint ​===+===== In This Section ​=====
-=== A Package and Dependency Manager for CodeIgniter ​===+
  
-Splint is product inspired by how wonderful the core of CodeIgniter,​ a light weigh MVC Framework with a lot of functionalities embedded in it. such that PHP libraries that were designed ​in a universal context may have to re-write some of the functionalities already found in CodeIgniter so that it could be used anywhere.\\+=> [[library-install|Install ​Splint Library]]\\ 
 +=> [[splint_production_server|Install Splint Packages ​in Production]]\\ 
 +=> [[app_install|Install ​Splint Application]]\\ 
 +=> [[splint_client:​start|Splint Client]]\\ 
 +=> [[load_splint|Load Splint Libraries]]\\ 
 +=> [[load_splint_app|Load Splint Application]]\\ 
 +=> [[splint_object|Splint Object]]\\ 
 +=> [[auto_load_splint|Auto-Loading Splints]]\\ 
 +=> [[splint_loader|The Splint Loader]]\\ 
 +=> [[update_splint|Updating Splint Client]]\\
  
-This could bloat resulting applications and of course present inefficiencies in the running of applications.\\+====== Splint ======
  
-Splint presents a way which developers can write libraries ​and at the same time use the functionalities which CodeIgniter ​provides (such as Image Processing, Form Validation, Zip Class, Database Libraries, etc.) to provide efficient and powerful light-weight libraries.\\+===== A Package ​and Dependency Manager for CodeIgniter ​=====
  
-Writing libraries for Splint ​also gives you the ability to write sub CodeIgniter ​applications that can be installed within ​CodeIgniter application bundle.+Splint ​is a product inspired by the wonderful core of CodeIgniterlight-weight MVC Framework with a lot of functionalities embedded in it.\\
  
-To use a Splint library, simply download and install the Splint client from [[https://splint.cynobit.com/downloads/​splint_setup.exe|here]], then run ''​splint install <​vendor\library_name>''​ at the root of your CodeIgniter ​project ​with terminal.\\+[[https://getcomposer.org/|Composer]] has always been the package and dependency manager for php all round since the dawn of time, however, when it comes to using libraries from Composer within a Code Igniter ​project, the library can't fully take advantage of the functionalities that Code Igniter offers. Hence, these libraries end up re-writing the functions for features that might already exist within Code Igniter. After all, composer is generic repository for all php packages regardless of the framework being used.\\
  
-You can then proceed ​to the library'​s page to view it's README on how to load it. You are most likely ​to load Splint libraries like this from within a controller.\\ ​+This can lead to bloated distributions of Code Igniter projects/​applications,​ or even a slightly less effective duplicate of a function that Code Igniter offers already. 
 + 
 +Splint provides a way for which developers can write libraries and at the same time use the functionalities which CodeIgniter provides (such as Image Processing, Form Validation, Zip Class, Database Libraries, etc.) to provide efficient and powerful light-weight libraries.\\ 
 + 
 +Writing libraries for Splint also gives you the ability to write sub CodeIgniter applications that can be installed within a CodeIgniter application bundle.\\ 
 + 
 +This means you can split your project into functional units and turn some of them that you find repeatedly useful into Splint packages so that all you need to do when working on a new project and require such functionality,​ is to run the ''​splint install''​ command from the root of your Code Igniter project within a terminal window. 
 + 
 +To use a Splint ​library, simply download and install the Splint client from [[https://​splint.cynobit.com/​downloads/​splint|here]],​ then run ''​splint install <​vendor\library_name>''​ at the root of your CodeIgniter project with a terminal for a given package.\\ 
 + 
 +All Splint packages are hosted on [[https://​github.com|GitHub]] so you can visit the package'​s ​GitHub ​page and view it's README on how to load/use it.\\ 
 + 
 +The README appears on the packages'​s page on the [[https://​splint.cynobit.com|Splint]] website as well.\\ 
 + 
 +You'​ll ​likely load Splint libraries like this within a controller.\\ ​
 <code php> <code php>
 $this->​load->​splint("​vendor_name/​library_name",​ "​+LibraryClassName"​ , $params, "​alias"​);​ // Library loaded and initialized with $alias. $this->​load->​splint("​vendor_name/​library_name",​ "​+LibraryClassName"​ , $params, "​alias"​);​ // Library loaded and initialized with $alias.
Line 18: Line 40:
 </​code>​ </​code>​
  
-the ''​$this->​load->​splint();''​ method call is available when you patch your ''​Loader''​ class and fortunately,​ the Splint command line tool automatically ​does that for you the moment you install a library. ​+The ''​$this->​load->​splint();''​ method call among others, ​is available when you patch your ''​Loader''​ class and fortunately,​ the Splint command line tool does that automatically ​for you the moment you install a library. ​
  
 Notice the ''​+''​ character before ''​LibraryClassName''​ in the above code. This tells splint to load a library from the specified package ''​vendor_name/​library_name''​ or rather search for a ''​php''​ file in with the name ''​LibraryClassName''​ from the libraries folder in the specified package and load it.\\  Notice the ''​+''​ character before ''​LibraryClassName''​ in the above code. This tells splint to load a library from the specified package ''​vendor_name/​library_name''​ or rather search for a ''​php''​ file in with the name ''​LibraryClassName''​ from the libraries folder in the specified package and load it.\\ 
Line 24: Line 46:
 You can also load ''​views'',​ ''​models'',​ ''​helpers''​ and ''​configs''​. All you need to do is use the required character as a prefix to the file name of the asset or php file you want to load from the package.\\ ​ You can also load ''​views'',​ ''​models'',​ ''​helpers''​ and ''​configs''​. All you need to do is use the required character as a prefix to the file name of the asset or php file you want to load from the package.\\ ​
  
-== Auto-load ​Prefixes ===+===== Load Prefixes ​=====
  
 The table below shows the characters and what they instruct the splint loader to load/search for. The table below shows the characters and what they instruct the splint loader to load/search for.
Line 35: Line 57:
 | %         | Helpers | | %         | Helpers |
  
-== Examples ==+==== Examples ​====
 For a library called ci-preference created by a vendor named francis94c, we can load a ''​Library'',​ ''​Model'',​ ''​View'',​ ''​Config'',​ or ''​Helper''​ in the manner shown below. For a library called ci-preference created by a vendor named francis94c, we can load a ''​Library'',​ ''​Model'',​ ''​View'',​ ''​Config'',​ or ''​Helper''​ in the manner shown below.
 <code php> <code php>
Line 71: Line 93:
 </​code>​ </​code>​
  
-== Topics ==+===== NEXT ===== 
 +[[library-install|Install a Splint Library]] => 
 + 
 +===== Other Topics ​=====
  
-[[splint_loader|Load Splint Libraries]]\\  +[[load_splint|Load Splint Libraries]]\\  
-[[developer:​create_project|Create ​a Splint ​Library]]\\ +[[developer:​create_project|Develop and Publish ​a Splint ​Package]]\\