it' brix for me

18 views
Skip to first unread message

decebal

unread,
Aug 25, 2011, 8:13:45 AM8/25/11
to brix-cms-discuss
Hello

I have an ecommerce application (in wicket - it's like an opencart
clone) and I want to add a cms capabilities to this application. I
know some things about brix. Brix is good for web site template but I
don't know how to deal with tiles' html code. For example, in an
ecommerce application I have a categories menu tile, a product list
tile, ... How can I modify (as designer) the html code for this tiles
from admin console? It's an open source application (no brix demo)
that shows how to integrate brix? Can someone that developed an
ecommerce application tell me some hints about how can I add brix to
my application in an easy mode?

Thanks,
decebal

Brian Topping

unread,
Aug 25, 2011, 11:58:23 AM8/25/11
to brix-cms...@googlegroups.com

On Aug 25, 2011, at 8:13 AM, decebal wrote:

> How can I modify (as designer) the html code for this tiles
> from admin console?

Unfortunately, you have to shut down the application and upgrade it with a new binary containing the changes that you want.

> Can someone that developed an
> ecommerce application tell me some hints about how can I add brix to
> my application in an easy mode?

Brix is typically implemented as the root mapping of a webapp, meaning the home page is in Brix. Other pages can be mapped with standard URI mounts.

Brian

Igor Vaynberg

unread,
Aug 25, 2011, 12:09:27 PM8/25/11
to brix-cms...@googlegroups.com
On Thu, Aug 25, 2011 at 8:58 AM, Brian Topping <brian....@gmail.com> wrote:
>
> On Aug 25, 2011, at 8:13 AM, decebal wrote:
>
>> How can I modify (as designer) the html code for this tiles
>> from admin console?
>
> Unfortunately, you have to shut down the application and upgrade it with a new binary containing the changes that you want.

you know thats not true Brian, i think you have a bit of a tunnel
vision with the osgi thing :)

at the ecom app i built brix for the product list tile took a couple
of template strings as configuration parameters and that is what it
used to generate the html. eg some basic templates can look like this:

product template: <li><a href="/products/${product.id}"><img
src="/images/products/${product.id}.jpg"/>${product.name}</li>
product list page template: <ul>${product.list}</ul>${pager}

we did it this way because we had multiple sites running on the same
brix instance and it worked really well.

if your target audience is not some non-techie designer you can use a
more advanced templating technique such as velocity or freemarker to
define the markup.


now, if you need code changes - then yes, you have to shut the app
down and deploy new jars. but, that is life for now.

-igor

>
>> Can someone that developed  an
>> ecommerce application tell me some hints about how can I add brix to
>> my application in an easy mode?
>
> Brix is typically implemented as the root mapping of a webapp, meaning the home page is in Brix.  Other pages can be mapped with standard URI mounts.
>
> Brian
>

> --
> You received this message because you are subscribed to the Google Groups "brix-cms-discuss" group.
> To post to this group, send email to brix-cms...@googlegroups.com.
> To unsubscribe from this group, send email to brix-cms-discu...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/brix-cms-discuss?hl=en.
>
>

Brian Topping

unread,
Aug 25, 2011, 12:20:32 PM8/25/11
to brix-cms...@googlegroups.com

On Aug 25, 2011, at 12:09 PM, Igor Vaynberg wrote:

> you know thats not true Brian, i think you have a bit of a tunnel
> vision with the osgi thing :)

No, actually, I never thought about doing a hack like this. So this statement is factually incorrect on two counts!

> now, if you need code changes - then yes, you have to shut the app
> down and deploy new jars. but, that is life for now.

Since you brought it up (I've been avoiding this kind of discussion on the Brix list, quite intentionally), I can't seem to remember the last time I worked on an agile site that needed new features that didn't affect code. So, regardless of whether this works, the probability of the site needing to be shutdown and restarted is very high. So we're both right. :-)

Igor Vaynberg

unread,
Aug 25, 2011, 1:02:14 PM8/25/11
to brix-cms...@googlegroups.com
On Thu, Aug 25, 2011 at 9:20 AM, Brian Topping <brian....@gmail.com> wrote:
>
> On Aug 25, 2011, at 12:09 PM, Igor Vaynberg wrote:
>
>> you know thats not true Brian, i think you have a bit of a tunnel
>> vision with the osgi thing :)
>
> No, actually, I never thought about doing a hack like this.  So this statement is factually incorrect on two counts!

so adding a <strong> tag around a product name on the site now
requires a java developer just because the list is generated by a
tile? why do we even have brix?

>> now, if you need code changes - then yes, you have to shut the app
>> down and deploy new jars. but, that is life for now.
>
> Since you brought it up (I've been avoiding this kind of discussion on the Brix list, quite intentionally), I can't seem to remember the last time I worked on an agile site that needed new features that didn't affect code.  So, regardless of whether this works, the probability of the site needing to be shutdown and restarted is very high.  So we're both right.  :-)

so everyone using wordpress to blog has to write PHP? tiles are meant
to allow non-technical people add dynamic behavior to the site. tiles
have a configuration dialog so that a code-change is not necessary
every time a user wants to tweak something. if that wasnt the case you
might as well write the app in straight wicket.

-igor

Brian Topping

unread,
Aug 25, 2011, 1:51:06 PM8/25/11
to brix-cms...@googlegroups.com

On Aug 25, 2011, at 1:02 PM, Igor Vaynberg wrote:

> On Thu, Aug 25, 2011 at 9:20 AM, Brian Topping <brian....@gmail.com> wrote:
>>
>> On Aug 25, 2011, at 12:09 PM, Igor Vaynberg wrote:
>>
>>> you know thats not true Brian, i think you have a bit of a tunnel
>>> vision with the osgi thing :)
>>
>> No, actually, I never thought about doing a hack like this. So this statement is factually incorrect on two counts!
>
> so adding a <strong> tag around a product name on the site now
> requires a java developer just because the list is generated by a
> tile? why do we even have brix?

If the list that is generated by the tile is used in multiple parts of the site, FOR INSTANCE, your hack would require the content folks to go to every place on the site that used the tile and add this content wrapper. This violates DRY. Are you proposing that people hack a bunch of HTML around every tile just to avoid rebooting their server? How does that site start to look after a few months of people doing it? Is that a site people want to work on? One that can grow and be sustainable? No. It's a giant mess.

How many sites have you done with Brix? Are they still in use? These are relevant questions, if you've only done one, for instance, you have a single set of problems that were solved. If they aren't in use any more, there's no telling that these issues I am raising may have been the reason why.

>>> now, if you need code changes - then yes, you have to shut the app
>>> down and deploy new jars. but, that is life for now.
>>
>> Since you brought it up (I've been avoiding this kind of discussion on the Brix list, quite intentionally), I can't seem to remember the last time I worked on an agile site that needed new features that didn't affect code. So, regardless of whether this works, the probability of the site needing to be shutdown and restarted is very high. So we're both right. :-)
>
> so everyone using wordpress to blog has to write PHP? tiles are meant
> to allow non-technical people add dynamic behavior to the site.

Great, I'm glad that's something that non-technical people can look forward to.

Now, let's talk about technical people that are trying to build a site worth adding resources to. Their workflow is made far more difficult by having to support all these hacks when it's a simple change inside the plugin. See next response as well.

> tiles have a configuration dialog so that a code-change is not necessary
> every time a user wants to tweak something.

Indeed. And in an agile environment, we don't sit around looking into a crystal ball trying to figure out every item that should be in a tile's configuration dialog, we add them as they are needed. Thus requiring code changes. So we're back to square one. The server needs to be rebooted. That is all I said, and you're making this big cyclone out of nothing.

> if that wasnt the case you
> might as well write the app in straight wicket.

It sounds like you have infinite resources and perfect project management for your projects. Speaking for myself, I don't. My SDLC is to vet an idea and start implementing it, hoping to get it to the point that there are revenues or investor interest to take it to the next level. At that point, investors are going to expect that I've created a maintainable system with scalable patterns, not a one-hit wonder that was hobbled with hacks and can't keep up with a team of offshore developers using Drupal et al. Because that offshore team will come when someone stateside with deep pockets sees a great idea that doesn't have feature velocity, whether they are hung up with bad tools, bad patterns, or whatever.

We can go around in circles like this for days, Igor. But the fact is we all have different means to solve problems, and as it's been demonstrated on IRC for the last week, we can all pick apart each other's development patterns and skills until we're blue in the fingers. Just because something works for you doesn't mean that it works for someone else. Good frameworks solve a problem, great frameworks embrace many ways of solving a problem. Developers are looking for great frameworks, period.

If Brix is only capable of solving a limited set of problems for a limited set of developers by the patterns that they themselves like to use, like I've been saying on IRC, let's make sure that expectation is clearly set so there is no disappointment. But if this is a general purpose framework for doing things that content management systems purport to do, let's make sure we're solving those problems to the best of our ability for the sake of the Brix community and ourselves alike. Doing so will reinvigorate the community, lead to new applications, and feed the cycle. Anything else is eventual death of the community, the framework, and all the energy that folks have invested in it.

For what it's worth, I'm done with this thread, so if you want the last word, go for it.


Jeremy Thomerson

unread,
Aug 25, 2011, 2:32:30 PM8/25/11
to brix-cms...@googlegroups.com
On Thu, Aug 25, 2011 at 1:51 PM, Brian Topping <brian....@gmail.com> wrote:

On Aug 25, 2011, at 1:02 PM, Igor Vaynberg wrote:

> On Thu, Aug 25, 2011 at 9:20 AM, Brian Topping <brian....@gmail.com> wrote:
>>
>> On Aug 25, 2011, at 12:09 PM, Igor Vaynberg wrote:
>>
>>> you know thats not true Brian, i think you have a bit of a tunnel
>>> vision with the osgi thing :)
>>
>> No, actually, I never thought about doing a hack like this.  So this statement is factually incorrect on two counts!
>
> so adding a <strong> tag around a product name on the site now
> requires a java developer just because the list is generated by a
> tile? why do we even have brix?

If the list that is generated by the tile is used in multiple parts of the site, FOR INSTANCE, your hack would require the content folks to go to every place on the site that used the tile and add this content wrapper.  This violates DRY.  Are you proposing that people hack a bunch of HTML around every tile just to avoid rebooting their server?  How does that site start to look after a few months of people doing it?    Is that a site people want to work on?  One that can grow and be sustainable?  No.  It's a giant mess.

Brian, the tile could have a default template, could it not?  Allowing a template to (optionally) be passed to it actually ENCOURAGES DRY.  The same tile for generating a list of products could then be used on dozens or hundreds of sites, allowing each site to customize the look of their product list slightly.  Plugins (which can register tiles) can have configuration pages, too, so a site owner could configure a default look for the product list, and then override only as necessary.  No Java changes necessary.  That's the point of Brix.


How many sites have you done with Brix?  Are they still in use?  These are relevant questions, if you've only done one, for instance, you have a single set of problems that were solved.  If they aren't in use any more, there's no telling that these issues I am raising may have been the reason why.

This is unnecessary.  Let's keep this list more civil.  That goes for a lot of the following responses as well, which I'm not responding to individually.

Jeremy Thomerson

Jeremy Thomerson

unread,
Aug 25, 2011, 2:44:51 PM8/25/11
to brix-cms...@googlegroups.com
Decebal,

  From what I can see, this last reply is actually fueled by some other IRC discussion.  Igor's way will work - he's done it.  I've done it (in betas only - not a public-facing site).  Brian's way will also work, but he's talking about building static tiles that don't allow the HTML to be overridden.  For what it's worth, most tiles are exactly this.  You build a tile just like you would a Wicket panel - as a bundle of Java and HTML.  It has a few configuration options (or none), and HTML guys implant these tiles in HTML.  But, if you need a highly dynamic tile (especially for something like a repeating list), you may be served well by allowing the HTML guy to specify an HTML template for the tile.

  Restarting the server is a whole different topic.  But I think that you've received your answer for your original question.

Jeremy Thomerson



--

decebal

unread,
Aug 25, 2011, 4:40:18 PM8/25/11
to brix-cms-discuss
Nice discussion with nice people :)

Actually I have a kind of CMS but I want to jump to the next level. In
my application I have a TemplatePage which contains a repeaters for
each zone (header, left column, right column, content and footer).
These zones are hardcoded for now. In admin section I can create tile/
widget instances (banner, simple html, categories menu,
informations, ...), each instance has a view (for frontend) and an
editor (for backend) with settings and information about position in
template (zone and sort index). This works nice and it's easy to
administrate by a non technical user.
But, each client want to be special, want a custom template for her
site.
I want to provide the ecommerce sites as services and these sites to
be very easy to administrate by non technical users. Next step will be
with brix or something else. Another approach sounds like this:
- each site template has css file(s), image files, some html code (one
file)
- each template contains a descriptor that can provides me some
informations about zones and I use this information to populate
position when I create a new tile
- each tile (a panel in general) has a html file and a java file
- when something want a template, he receives a zip file with template
descriptor, template page changes (css, images) and some folders with
tiles that was adapted (html and/or code), install this zip template
file (override files on server) and restart the server.

What you think about my approach? I like brix but I don't know if it
can help me in this particular situation (I have already a tiny cms
like, I have a fixed workflow, ...)

Thanks for all your support guys,
Decebal
Reply all
Reply to author
Forward
0 new messages