Chunk


Source link: https://github.com/tomj74/chunk-templates

Chunk Templates for Java

Full documentation at http://www.x5software.com/chunk/

Chunk is a Java Template Engine for applications that serve HTML or XML. It's the little engine that can handle any templating job, plain text, markup, markdown, whatever, wherever.

Chunk is compact and speedy, easy to learn yet very powerful.

Chunk templates provide a rich featureset: in-tag filters, in-tag default values, includes, looping and branching, defining multiple snippets per template file, layered themes, macros, and much much more.

Quick Start

Browse the fabulous documentation chock full of examples and recipes.

Download the latest chunk-template jar. Works with Java 1.5 and up.

Available from Maven Central:


 <dependency>

 <groupId>com.x5dev</groupId>

 <artifactId>chunk-templates</artifactId>

 <version>3.3.1</version>
  </dependency> 

Features

  • Compatible with Android, GAE (Google App Engine), Spring MVC.
  • Nestable looping and branching (if/elseIf/else).
  • Macros, includes and conditional includes.
  • Speedy rendering engine that pre-parses templates.
  • Curly-brace { $tags } pop nicely in a backdrop full of <AngleBrackets> (and your xml/html can still validate).
  • Flexible null-handling; template designer may easily specify default tag values.
  • Swiss army knife of chainable filters a la { $tag|trim } , including regex (regular expressions), sprintf.
  • Localization framework.
  • Rapid MVC: Glue a "model" object (or objects) to a "view" template with a single line of controller code.
  • Define multiple composable snippets per template file.
  • Stateless tags - encourages cleaner code via separation of concerns.
  • Support for theme layers with layered inheritance.
  • Hooks for extending - add your own filters, template loader, or tag protocol.
  • Eclipse Template Editor plugin available with syntax highlighting & more.

An Eclipse plugin provides syntax highlighting, outline navigation pane for snippets in .chtml files, and auto-hyperlinks of snippet references. Requires Eclipse Helios (3.6) or better. Get the plugin.


Dependencies

Most features work fully with the standalone jar. A couple advanced features can be unlocked by adding these libraries to the classpath:


 <dependency>

 <groupId>net.minidev</groupId>

 <artifactId>json-smart</artifactId>

 <version>1.1.1</version>
  </dependency> 
  • Enable jeplite-powered math expression evaluation via the |calc(...) filter - download jeplite jar or fetch via maven:

 <dependency>

 <groupId>org.cheffo</groupId>

 <artifactId>jeplite</artifactId>

 <version>0.8.7a</version>
  </dependency> 

Android: Binding Beans to Template

Note: on Android (optional) - to make use of chunk.setToBean("tag",bean) binding, just make sure to include this additional dependency in your project:


 <dependency>

 <groupId>com.madrobot</groupId>

 <artifactId>madrobotbeans</artifactId>

 <version>0.1</version>
  </dependency> 

Or download madrobotbeans-0.1.jar from the Downloads area. Thanks to Elton Kent and the Mad Robot project.

Resources

Training courses to acquire basic knowledge and practical skills of Android app development.

JFYI: You could use Google Translate to translate from Japanese.

Helper object for injecting typeface into various text views of android.

We can use various custom typefaces asset for any text views (like TextView, Button, RadioButton, EditText, etc.), but there's no way to set the typeface as a styled theme to apply the typeface for overall screens in the app.

This library helps to do it in easy way. :)

CWAC-Presentation: Second Screens Supported Succinctly

This project offers a series of classes that wrap around the Presentation and DisplayManager of Android 4.2.

This project offers a StreamProvider, based on Google's FileProvider. Like FileProvider, StreamProvider is designed to serve up files, for reading and writing, through the ContentProvider interface (content:// Uri values). StreamProvider offers:

  • Serving files from assets and raw resources
  • Serving files from getExternalFilesDir() and getExternalCacheDir()

This is a simple Android View class which provides basic pinch and zoom capability for images.

Can be used as a replacement for a standard ImageView when you want to include pinch and zoom.

Features:

  • Pinch zoom in place (i.e. zoom occurs from point of touch)
  • Panning with fling gesture
  • Double tap zoom
  • Configurable zoom boundaries (min/max)

A drupal services rest client with retrofit for Android.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes