Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
Ziggi

What About Modern Ui (Like Dojo->Dijit) ?

Recommended Posts

Hi,

 

I started to think about dynamic tabbed UI for my application. A dynamic tabbed UI is nice way to present data as they flow during processing.

 

For instance an account is starting a new mailing campaing feeding appropriate data like customer, distribution list, start date, end date, repetition count, etc.

 

When this is completed, a new tab is opened where a designer can feed a mail layout.

 

When this is completed a new tab is opened where customer can drop his/her remarks or approve campaing for mailing.

 

And the beauty of tabbed interface is that all data are nicely layouted and immediately available with no extra server requests.

 

So, this all looks great but I have no idea how this could be implemented with Yii. There is a nice DOJO wrapper for Yii but its documentation is poor and examples available none.

 

Do you have any experience with this sort of interfaces and can share some basic ideas?

 

Larry - why not extend Yii book with some appendix with such a Web 2.0 examples? Please notice - Yii is addvertsed as "best for Web 2.0" whlle it is really hard to find any real "Web 2.0" examples!

Share this post


Link to post
Share on other sites

Some of the beauty of views is that you may introduce such things easily. Add the Javascript file reference to the header and apply the code needed in the bottom of the view file. Very simple, and very affective. No need to make this more complex by wrappers or that sort of things. I can be benefitial, but it's not really required.

 

Doing this in YII is no different than with standard HTML. The only thing is that you can't take advantage of YII's event system (which seem awesome) but you should be able to get most tasks done with standard JS/Dojo code. A little drawback admittedly, but sometimes the best solution is the simplest one. If this does not work, I'm sure jQuery can perform all of the same tasks.

 

Hope that's a good enough of an opinion. I know you don't always like these opinion based posts, so ignore it if the shoe does not fit.

Share this post


Link to post
Share on other sites

Thank you, Antonio - a bit too general opinion this time (like how to integrate different tabs with different models/controllers?) but anyway...

Share this post


Link to post
Share on other sites

Are you just saying you want something like this: http://jqueryui.com/tabs/ Because, if so, then check this out: http://www.yiiframework.com/forum/index.php/topic/21917-jquery-ui-tabs-and-dialog/

 

Also, "Web 2.0" is a complete bullshit label that doesn't mean anything. It's just a marketing thing. You should do yourself a favor and stop thinking that Web 2.0 exists or that there are Web 2.0 examples. No such thing at all. I do appreciate the suggestion, but there's no chance at all that the book will have a "Web 2.0 examples" appendix, or even talk about Web 2.0 at all. The book will, however, present many examples for how Web sites are developed and used today.

 

And as an aside, if we're counting "Webs", we're clearly past 2.0 at this point. And if we were at Web 2.0 today, how would we know when we're at Web 3.0? And would the Web 2.0 examples work in Web 2.0? You see: all marketing bullshit.

 

So instead of looking for Web 2.0 examples, look for examples of what you actually need: DOM manipulation or Ajax or whatever.

  • Upvote 1

Share this post


Link to post
Share on other sites

Hehe - plain language but I fully agree, Larry. Nevertheless - thanks for example but still the main problem remains:

 

- it is NOT how to SHOW things in tabbed manner

- it IS how tabbed content should INTERACT with various controllers/models behind (eg. tab 1 relates to controller A while tab 2 relates to controller B.)

 

Any idea here - I would really appreciate!

Share this post


Link to post
Share on other sites

I think a large part of your problem is that you ask for "YII based examples". What you want to achieve here is a simple step by step system based on logic and some clauses. The only difference on how to achieve this in YII and a simple procedurally coded website is where to place the blocks of logic.

 

The question is this: are you sure my "general opinion" is not only a lack of understanding for the things possible to deploy within YII? I can't really see any problems implementing something along your description with DOJO. The only problem I have is that I can't really give you a step by step explanation on how to achieve the wanted result...

 

Concluded. Are you sure you attacking the problem from the right angle? It looks like a simple "achievement system" to me. Once an achievement is unlocked, a new tab is opened.

 

This feels very much like your static pages problem to me. I'm not sure you try to solve the problems the easiest way possible.

Share this post


Link to post
Share on other sites

Hmm,

 

Antonio - please, try to think about this as "tabbed forms" rather than "tabbed content". Then you perhaps can give me a clue how specific tab can communicate with specific controller/model while being served by a single view. This is my problem actually.

Share this post


Link to post
Share on other sites
- it IS how tabbed content should INTERACT with various controllers/models behind (eg. tab 1 relates to controller A while tab 2 relates to controller B.)

 

Well, first of all, the tabs aren't INTERACTING with the controllers at all. Not unless you're using Ajax, of course. But if you want different tabbed content to be associated with different controllers, it's simple. I would start by creating each tab as a view file and use renderPartial() to pull it all together. If some of that content happens to be forms (which, by the way, are just a specific type of content), then just set the form so that it gets submitted to the proper controller.

 

If I understand you correctly, that's how I would approach the problem, and it seems like maybe you're overthinking this.

Share this post


Link to post
Share on other sites

Ziggi. Not to get personal about this, but read my suggestion one more time. They are along the exact same line as Larry's, and I have to tell you that rendering views partially is nothing special. My suggestion actually tell you have such a task can be performed, but you don't really seem interested in accepting that.

Share this post


Link to post
Share on other sites

Antonio - sorry - I do not pretend a Yii master. I think I learn fast but sometimes one needs just a "right" clue not a "good" one.

 

This time you gave me "good" clues while Larry's offered a "right" one!

 

And sure - partial render is nothing special but... one have to catch the idea... ;-)

 

Have a nice weekend and thank you !!!

Share this post


Link to post
Share on other sites

Actually, I gave you way more to go on than Larry. While his recommendation about rendering views might seem what you are after, you really need to be able to apply the right kind of logic to the rendering of those views to achieve what you want. While his answer is completely correct, you completely fail to understand the requirements along the way to achieve what you want...

 

I'm a pretty nice guy, so I'll just tell you to read more on the basic principles of the MVC pattern. With basic logic and that theory under your belt, this problem should be very solvable for you.

  • Upvote 1

Share this post


Link to post
Share on other sites

Thank you, Antonio - sure never enough learning but this time I am pretty sure what I want.

 

I want a tabbed "baby steps" kind of interface (you call it "achievement system") where each "achievement" is goverened by a separate model/controller. So, the step - while completed - is stored in a database rather than in persistent session data or a cookie.

 

Best regards,

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...