New features in a new version

141 views
Skip to first unread message

Peter Širka

unread,
May 18, 2014, 2:06:46 PM5/18/14
to tot...@googlegroups.com
I'm preparing a new version. I'd like to introduce new features.
You can download a new BETA version from GitHub.

Download:

1. LESS is replaced to JS CSS:

2. I added a new config file

New config file is "config" and it's for both modes (debug/release). Other configs can rewrite this config.
Designed by: Mateusz Gachowski


3. Older template engine was completely removed

So this will not work:

This will work:


4. I updated test function

framework.assert() in new version supports FLAGS and supports cookies.


5. View/Template engine supports assign values


6. TPM - Total.js Package Manager

This is a new binary/executable file for Terminal/CMD. With the help of TPM you can install/uninstall any total.js module or templates. You can create own package repository on own server.

7. I'm adding JSDOC comments (gradually).


Changelog:
https://github.com/totaljs/framework/blob/master/changes.txt


arief nur andono

unread,
May 19, 2014, 12:30:57 AM5/19/14
to tot...@googlegroups.com
I wish you could change loop syntax instead of <!--, because it made confuse when I want to disable hide some text in template and made autocomplete off..

Peter Širka

unread,
May 19, 2014, 1:41:17 AM5/19/14
to tot...@googlegroups.com
I know ... I can change <!-- .... but for what? :-)

arief nur andono

unread,
May 19, 2014, 6:20:44 AM5/19/14
to tot...@googlegroups.com
It will make view code more explisit and understandable escpecially for new coder..
for example in angular use ng-repeat..word 'repeat' more understandable as loop than <!-- -->
some html guys know it as comment in html..I think view engine code will used by designer frequently than programmer..

if you give completely new view engine, I hope you change it for loop..
but it depends on you..

thank you 

Pada Senin, 19 Mei 2014 1:06:46 UTC+7, Peter Širka menulis:

Peter Širka

unread,
May 19, 2014, 7:23:14 AM5/19/14
to tot...@googlegroups.com
What do you think about it? My tip:
templates/sometemplate.html:

Example:

@{foreach}
   
<div>@{model.name}</div>
@{end}

Older templating will work too:

<!--
    <div>@{model.name}</div>
-->

arief nur andono

unread,
May 19, 2014, 11:01:07 PM5/19/14
to tot...@googlegroups.com
that's awesome..thank's a lot..


Pada Senin, 19 Mei 2014 1:06:46 UTC+7, Peter Širka menulis:

Al

unread,
May 22, 2014, 9:44:59 AM5/22/14
to tot...@googlegroups.com
Awsome work ... !!!

Peter Širka

unread,
May 26, 2014, 3:10:12 AM5/26/14
to
New features in views:

- looping, example:

@{foreach m in [1, 2, 3, 4]}
   
<div>@{m} - @{index}</div>
@{end}

- nested conditions, example:

@{if 1==1}
   
@{if 2 == 2}
       
@{if 3 == 3}
           
<div>NESTED</div>
       
@{endif}
   
@{endif}
@{endif}

- inline helpers, example:

@{helper address(city, street)}
   
<address>@{city}<br />@{street}</address>
@{end}

<div>Address 1:</div>
@{address('Bratislava', 'Teplicka 19')}

<br />

<div>Address 2:</div>
@{address('Kosice', 'Petrova 41')}


- templates, some template example:

@{foreach m in model)
   
<div>@{m}</div>
@{end}

or

@{foreach}
   
<div>@{model}</div>
@{end}

or OBSOLETE:

<!-- <div>@{model}</div> -->

Thanks :)
Reply all
Reply to author
Forward
0 new messages