Česky
version 3.1.1

  PClib - PHP component library

  1. PClib in a nutshell
  2. Differences
  3. Tips and tricks
  4. Conceptions

PClib in a nutshell

  • Open source library for PHP 7 and 8
  • For development of small to middle size web applications
  • Features: template engine, managing forms and datagrids, authentication and authorization, database layer, multilanguage support and more.
  • Easy fits into your existing code, you do not need learn philosophy of big framework
  • Simple and concise API. Keep the code as short as possible. Form and grid save your time even in smallest projects.
  • Flexibility: PClib will not stand in your way and force you to do things "only" correct way.
  • It's free for any (commercial or non-commercial) applications (LGPL licence)

Where are differences?

Nowadays, there are many php frameworks. Here are few points in which pclib is different (we believe).
  • Truly lightweight. PClib consists of about 50 php-files. Zend framework: 1700+ files
  • Moderate using of OOP. Do not use every mystical OOP feature just because it exists. You can code in oldschool way, which we all like.
  • Unique template engine. You can define parameters of template (for example form) using simple metalanguage. It is clean and still you can modify each parameter even from your php code.
  • Do not force you use design patterns, predefined application structure, strict naming conventions - it will respect your coding style. Programer is most qualified to know what he need, no theory can be applied on every situation.

Tips and tricks

Would you like put CSS and JS files into the website layout simply and dynamically?
head HEAD scripts "styles.css,pclib/assets/pclib.js"
Next tip

A few words regarding library concepts

It don't use very advanced concepts which can be useful only in very complex projects. Everything has price and this techniques usually makes code much more complicated.

Concentrates on most used things (in common web application): form and grid. A lot of features, often supported by other frameworks are overrated and less important (which we don't say that they are not important at all)

Just like with plain PHP, you can start solve your problem with the first line of your code, without complex configuration, source generation and solving many pure technical aspects.

We are using "convention over cofiguration" concept. Without configuration and parameters - features (objects, functions, template params) should work expected way. Next level is basic configuration, still very intuitive, focused on most common parameters and last is advanced parametrization allowing modify each aspect of the feature. Basic user do not need know and bother with complex interface.

PClib will solve a lot of technical and security issues for you on the background. Backslashing, validation and sanitization of user input, automatic formating of date, session hijacking and sql injection protection, file upload issues etc.