0

Friendly URL's, site organisation...

asked 2006-04-18 18:25:18 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3692776

By: oberinspector

hello,

again some thougts to friendly urls, caching...

for my project almost anything comes from the database... layouts and styles for different sites, domains and subdomains, menu, content... even internationalisation is partly handled in db tables... the great createComponentsDirectly(String fromDB) or createComponentsDirectly(PageDefiniton
fromCache)(?) functions make many things possible...

so in fact i would need no folders and *.zul files to build my desktop and organize my site structure. a single index.zul would probably be enough, when i...

1. get access to to the complete url string, (++) 2. can avoid that zk evaluates the url, (++) 3. can update the url in the browser address field without reload the page (+)

the mentioned index.zul should always be invoked from all urls matching the
pattern:
http://*.domain.com/*/*/* ...

when the url is htp://domain.com the zul layout is retrieved from db (a zul string with css and hbox, vbox, image... components...) and the boxes are replaced with the actual startpage content from db.

http://subdomain.domain.com has probably the same base layout, but a diffrent navigation and startpage... in this case domain.com PageDefinition (cache key
e.g.: "de:domain.com")is retrieved from cache and navigation and startstory is replaced. The new PageDefinition is cached under e.g. key:
"de:subdomain.domain.com".

and so on for http://subdomain.domain.com/contentType/contentId ...

probably the starting point for this is a web.xml configuration for the url and an adopted ZKLoader servlet...

do you think something like this is possible?

regards, thomas


delete flag offensive retag edit

8 Replies

Sort by ยป oldest newest

answered 2006-04-19 02:28:10 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3693273

By: tomyeh

Hi Thomas,

First of all, it is an excelent move to use db for all UI stuffs.

As mentioned in Feature 1469672, I will provide a factory to instantiate Desktop, Page and, with your input, converting URL to PageDefinition.

Then, you can provide your own factory for loading (and caching) UI from db:)

Tom

link publish delete flag offensive edit

answered 2006-04-19 07:01:31 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3693458

By: oberinspector

the idea comes from your great live demo, which shows how easy it is to dynamicly create ui from strings...

i will follow this track... could you give me a good starting point how to build my own factory?

regards,
thomas

link publish delete flag offensive edit

answered 2006-04-19 15:09:18 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3694152

By: tomyeh

Extending from UiFactoryImpl is the simplest way. For your application, you need only to ovrride getPageDefinition and retrieve the content from dabase.
After retrieving it, invoke getPageDefinitionDirectly to conver it to PageDefiniton.
Straightforward!

Remember to specify your class in zk.xml, refer to appendix B. Also take a look at the source codes if any doubt.

Thomas, you must write a small talk for us after completing it:)

Tom

link publish delete flag offensive edit

answered 2006-04-19 17:07:27 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3694550

By: oberinspector

thanks a lot!

of course i will write a small talk... probably i will have to ask one or two more questions until then... ;)

link publish delete flag offensive edit

answered 2006-04-24 09:17:42 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3700236

By: tomyeh

Thomas,

Since there are too many files in com.potix.zk.ui.sys, I moved the implementation relative classes to com.potix.zk.ui.impl (in 2/24 nightly).

Tom

link publish delete flag offensive edit

answered 2006-04-24 09:30:50 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3700254

By: oberinspector

hi tom,

thanks for the information... i didn't start with this task, but it's on my todo list...

regards, thomas

link publish delete flag offensive edit

answered 2006-04-24 18:33:01 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3701126

By: kaewkasi

Hi Tom,

Can the components created with the 'createComponentsDirectly' method refer to scripts defined in parent window element (using the hierarchy search you've just added)?

Chanwit

link publish delete flag offensive edit

answered 2006-04-26 13:47:40 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3703565

By: tomyeh

Yes, just remember to specify the parent -- though I didn't test it:)

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2006-04-18 18:25:18 +0800

Seen: 735 times

Last updated: Apr 26 '06

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More