digitalmars.D.announce - Diamond - MVC / Template engine
- Bauss (21/21) May 21 2016 Just finished up the base for Diamond and its initiate state with
- Chris (7/7) May 21 2016 On Saturday, 21 May 2016 at 08:20:00 UTC, Bauss wrote:
- Bauss (2/9) May 21 2016 Thank you and yes, there's a few wiki pages at the moment.
- Vladimir Panteleev (4/7) May 21 2016 The name is taken :)
- Bauss (6/13) May 21 2016 Well I didn't see it in the dub repository, so I didn't assume
- =?UTF-8?B?THXDrXM=?= Marques (4/9) May 23 2016 The dub repository seems to have a problem properly escaping your
- Bauss (2/13) May 23 2016 Yes, I didn't even notice that :)
- Kagamin (1/1) May 24 2016 The values are injected unescaped by default?
- Bauss (7/8) May 24 2016 Yes. To escape there is the escape function.
- Bauss (3/11) May 24 2016 Note: If you have a better suggestion, feel free to come with one
- Bauss (3/18) May 24 2016 No wait I forgot it already is possible.
- Bauss (6/25) May 24 2016 I am such a mess today and also wish there was an edit button for
- Bauss (6/33) May 24 2016 A commit has now been done with escaping for variables /
- Kagamin (4/6) May 25 2016 I'd say do what razor does: raw output should require extra
- Bauss (4/10) May 25 2016 So you suggest to switch them around? :)
Just finished up the base for Diamond and its initiate state with Github and Dub, as well the first guide on using Diamond with vibe.d for websites. Diamond is a MVC / Template framework originally made for a hobby project, but as I developed it further I saw some potential in it and have now decided to make it open-source. It can be used to write websites/webservices on-top of vibe.d Allowing you to easily create and run websites/webservices without a lot of configurations to vibe.d since it's all done through simple configuration files in json, as well handled behind the scenes within the core framework of Diamond. Diamond however is also a template framework for views (Originally designed for web-views only.) and thus can be used to render MVC websites using its own syntax, heavily inspired by the ASP.NET razor syntax; not entirely though. It's currently in its first stable alpha version (0.2.2) For more information please view below. Dub repository: https://code.dlang.org/packages/diamond Github: https://github.com/bausshf/Diamond
May 21 2016
On Saturday, 21 May 2016 at 08:20:00 UTC, Bauss wrote: [snip] Sounds interesting. Are you planning to add a tutorial / more examples? Typo on your Github page: "on every playform that can compile D" playform => platform
May 21 2016
On Saturday, 21 May 2016 at 10:02:17 UTC, Chris wrote:On Saturday, 21 May 2016 at 08:20:00 UTC, Bauss wrote: [snip] Sounds interesting. Are you planning to add a tutorial / more examples? Typo on your Github page: "on every playform that can compile D" playform => platformThank you and yes, there's a few wiki pages at the moment.
May 21 2016
On Saturday, 21 May 2016 at 11:02:41 UTC, Bauss wrote:On Saturday, 21 May 2016 at 10:02:17 UTC, Chris wrote:Just finished stand-alone support and added a "guide" on how to use it. There are currently 3 guides on using it for websites, webservices and as stand-alone. Next thing coming up is a website for the whole thing :) This marks the last "initial" alpha version 0.2.3 The plan is to have monthly releases with stable versions.On Saturday, 21 May 2016 at 08:20:00 UTC, Bauss wrote: [snip] Sounds interesting. Are you planning to add a tutorial / more examples? Typo on your Github page: "on every playform that can compile D" playform => platformThank you and yes, there's a few wiki pages at the moment.
May 21 2016
On Saturday, 21 May 2016 at 19:32:58 UTC, Bauss wrote:On Saturday, 21 May 2016 at 11:02:41 UTC, Bauss wrote:Thanks for the quick guides. Typo on homepage: rewamped => revampedOn Saturday, 21 May 2016 at 10:02:17 UTC, Chris wrote: Thank you and yes, there's a few wiki pages at the moment.Just finished stand-alone support and added a "guide" on how to use it. There are currently 3 guides on using it for websites, webservices and as stand-alone. Next thing coming up is a website for the whole thing :) This marks the last "initial" alpha version 0.2.3 The plan is to have monthly releases with stable versions.
May 23 2016
On Monday, 23 May 2016 at 11:22:38 UTC, Chris wrote:On Saturday, 21 May 2016 at 19:32:58 UTC, Bauss wrote:Thank you, it has been fixed :)On Saturday, 21 May 2016 at 11:02:41 UTC, Bauss wrote:Thanks for the quick guides. Typo on homepage: rewamped => revampedOn Saturday, 21 May 2016 at 10:02:17 UTC, Chris wrote: Thank you and yes, there's a few wiki pages at the moment.Just finished stand-alone support and added a "guide" on how to use it. There are currently 3 guides on using it for websites, webservices and as stand-alone. Next thing coming up is a website for the whole thing :) This marks the last "initial" alpha version 0.2.3 The plan is to have monthly releases with stable versions.
May 23 2016
On Saturday, 21 May 2016 at 08:20:00 UTC, Bauss wrote:Just finished up the base for Diamond and its initiate state with Github and Dub, as well the first guide on using Diamond with vibe.d for websites.The name is taken :) https://github.com/CyberShadow/Diamond I don't mind though.
May 21 2016
On Saturday, 21 May 2016 at 19:46:38 UTC, Vladimir Panteleev wrote:On Saturday, 21 May 2016 at 08:20:00 UTC, Bauss wrote:Well I didn't see it in the dub repository, so I didn't assume anyone had used the name, so didn't assume anything existed with it. I apologize for the inconvenience though.Just finished up the base for Diamond and its initiate state with Github and Dub, as well the first guide on using Diamond with vibe.d for websites.The name is taken :) https://github.com/CyberShadow/Diamond I don't mind though.
May 21 2016
On Saturday, 21 May 2016 at 08:20:00 UTC, Bauss wrote:For more information please view below. Dub repository: https://code.dlang.org/packages/diamond Github: https://github.com/bausshf/DiamondThe dub repository seems to have a problem properly escaping your example template. Could you check on that, and if the problem is on the dub registry create a bug report there?
May 23 2016
On Monday, 23 May 2016 at 16:15:08 UTC, Luís Marques wrote:On Saturday, 21 May 2016 at 08:20:00 UTC, Bauss wrote:Yes, I didn't even notice that :)For more information please view below. Dub repository: https://code.dlang.org/packages/diamond Github: https://github.com/bausshf/DiamondThe dub repository seems to have a problem properly escaping your example template. Could you check on that, and if the problem is on the dub registry create a bug report there?
May 23 2016
On Tuesday, 24 May 2016 at 13:09:28 UTC, Kagamin wrote:The values are injected unescaped by default?Yes. To escape there is the escape function. Take a look at the comparison for the result. I'm going to figure out a syntax for escaping though, so there'll be one for both. Not sure what symbols to use though. $=value_to_escape; is probably going to be the result.
May 24 2016
On Tuesday, 24 May 2016 at 14:54:27 UTC, Bauss wrote:On Tuesday, 24 May 2016 at 13:09:28 UTC, Kagamin wrote:Note: If you have a better suggestion, feel free to come with one :)The values are injected unescaped by default?Yes. To escape there is the escape function. Take a look at the comparison for the result. I'm going to figure out a syntax for escaping though, so there'll be one for both. Not sure what symbols to use though. $=value_to_escape; is probably going to be the result.
May 24 2016
On Tuesday, 24 May 2016 at 14:57:03 UTC, Bauss wrote:On Tuesday, 24 May 2016 at 14:54:27 UTC, Bauss wrote:No wait I forgot it already is possible. Using (value_to_escape)On Tuesday, 24 May 2016 at 13:09:28 UTC, Kagamin wrote:Note: If you have a better suggestion, feel free to come with one :)The values are injected unescaped by default?Yes. To escape there is the escape function. Take a look at the comparison for the result. I'm going to figure out a syntax for escaping though, so there'll be one for both. Not sure what symbols to use though. $=value_to_escape; is probably going to be the result.
May 24 2016
On Tuesday, 24 May 2016 at 15:00:34 UTC, Bauss wrote:On Tuesday, 24 May 2016 at 14:57:03 UTC, Bauss wrote:I am such a mess today and also wish there was an edit button for forum posts. (value_to_escape) will only escape text and not variables, so a syntax for an expression/variable is still up. I will go with the $= syntax for nowOn Tuesday, 24 May 2016 at 14:54:27 UTC, Bauss wrote:No wait I forgot it already is possible. Using (value_to_escape)On Tuesday, 24 May 2016 at 13:09:28 UTC, Kagamin wrote:Note: If you have a better suggestion, feel free to come with one :)The values are injected unescaped by default?Yes. To escape there is the escape function. Take a look at the comparison for the result. I'm going to figure out a syntax for escaping though, so there'll be one for both. Not sure what symbols to use though. $=value_to_escape; is probably going to be the result.
May 24 2016
On Tuesday, 24 May 2016 at 15:03:28 UTC, Bauss wrote:On Tuesday, 24 May 2016 at 15:00:34 UTC, Bauss wrote:A commit has now been done with escaping for variables / expressions. Can be seen here: https://github.com/bausshf/Diamond/commit/e082d63d2a351a9e57cfc7f8bee8182711919759 It'll come in version 0.2.4On Tuesday, 24 May 2016 at 14:57:03 UTC, Bauss wrote:I am such a mess today and also wish there was an edit button for forum posts. (value_to_escape) will only escape text and not variables, so a syntax for an expression/variable is still up. I will go with the $= syntax for nowOn Tuesday, 24 May 2016 at 14:54:27 UTC, Bauss wrote:No wait I forgot it already is possible. Using (value_to_escape)On Tuesday, 24 May 2016 at 13:09:28 UTC, Kagamin wrote:Note: If you have a better suggestion, feel free to come with one :)The values are injected unescaped by default?Yes. To escape there is the escape function. Take a look at the comparison for the result. I'm going to figure out a syntax for escaping though, so there'll be one for both. Not sure what symbols to use though. $=value_to_escape; is probably going to be the result.
May 24 2016
On Tuesday, 24 May 2016 at 14:57:03 UTC, Bauss wrote:Note: If you have a better suggestion, feel free to come with one :)I'd say do what razor does: raw output should require extra syntax. Weren't templates created in order to not build html in code?
May 25 2016
On Wednesday, 25 May 2016 at 12:29:03 UTC, Kagamin wrote:On Tuesday, 24 May 2016 at 14:57:03 UTC, Bauss wrote:So you suggest to switch them around? :) =value; will become encoded and $=value; will become raw? That could work out.Note: If you have a better suggestion, feel free to come with one :)I'd say do what razor does: raw output should require extra syntax. Weren't templates created in order to not build html in code?
May 25 2016