Git Product home page Git Product logo

stamp's Introduction

STAMP

Build Status

Stamp is micro template library orignally written by Gabor de Mooij.

Stamp t.e. is a new kind of Template Engine for PHP. You don't need to learn a new template language and you get 100% separation between presentation logic and your HTML templates.

How it Works

Stamp t.e. is a string manipulation based template engine. This is a different approach from most template engines which use inline templating. In Stamp t.e. you set markers in your template (HTML comments), these are then used to manipulate the template from the outside.

What does it look like

A cut point maker marks a region in the template that will be cut out from the template and stored under the specified ID.

<div>
<!-- cut:diamond -->
<img src="diamond.gif" />
<!-- /cut:diamond -->
</div>

Now pass the template to StampTE:

$se = new StampTE($templateHTML);

To obtain the diamond image:

echo $se->get('diamond');

Result:

<img src="diamond.gif" />

More info: http://www.stampte.com

Advantages

  • Clean, code-free HTML templates, No PHP in your HTML
  • Compact presentation logic free of any HTML
  • No new syntax to learn, uses basic HTML markers already in use by many frontend developers to clarify document structure
  • Templates do not have to be converted to be used with PHP logic (toll free template upgrades)
  • Templates are presentable before integration because they may contain dummy data which is removed by StampTE
  • Easy to exchange templates, templates are ready to use
  • Very suitable for advanced UI development and complex templates for games
  • Templates become self-documenting, PHP code becomes more readable (less bugs)
  • Automatically strips HTML comments
  • Integrated caching system
  • Automatically escapes strings for Unicode (X)HTML documents
  • Just ONE little file
  • Unit tested, high quality code
  • Open Source, BSD license

stamp's People

Contributors

gabordemooij avatar slava-vishnyakov avatar

Stargazers

M N Islam Shihan avatar

Watchers

M N Islam Shihan avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.