Archetype/Dynamic URL?

10 messages Options
Embed this post
Permalink
Aprilz () Archetype/Dynamic URL?
Reply Threaded More More options
Print post
Permalink
I have created some "directory" archetype as product and it essentially does an xmlrpc call, gets a json/array object of all the users information, and displays a directory of the users' names and profile information.

I have done a search function using jquery as I am absolutely terrified of implementing a form in a plone product. There seems to be no guides to doing so. Or is there?

So the directory path is something like "/directory"

How would you be able to show individual user profiles through "/directory/ID_NUMBER"? Does Plone allow dynamically generated pages?

The users change frequently and I don't really know how the url address thing will work. Do I have to manually force-create some user archetype for all the users returned by the xmlrpc call? Or create a dummy user archetype that will fill data with the ID_NUMBER passed by POST (since GET seems impossible)?

I can do more xmlrpc calls using the ID_NUMBER to get information, but just unsure how Plone allows you to get information from the url and dynamically create a page.

Thanks for any help!!!

Developing Plone products is a nightmare for newbies. Are there any online guides/books that teaches you just how to create a full plone product? I seem to be unable to find any at all. Not the ambigious -> here is the basic file structure, now use psychic powers to fill the files up with advanced xml and python and hope everything works. ='( Plone makes newbie developers cry.
Jon Stahl () RE: Archetype/Dynamic URL?
Reply Threaded More More options
Print post
Permalink
> Developing Plone products is a nightmare for newbies. Are there any
> online guides/books that teaches you just how to create a full plone
product?
> I seem to be unable to find any at all. Not the ambigious -> here is
the
> basic file structure, now use psychic powers to fill the files up with
> advanced xml and python and hope everything works. ='( Plone makes
newbie
> developers cry.

Since a Plone product can do almost anything, it is hard to offer a
generic step-by-step approach to creating one.  

That said, Martin Aspeli's "Professional Plone Development" offers a
very useful in-depth look at creating quite a few kinds of products.


:jon

---------------
Jon Stahl, Director of Web Solutions
ONE/Northwest
http://www.onenw.org
[hidden email]
206.286.1235x15




_______________________________________________
Product-Developers mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/product-developers
-----
Jon Stahl, Director of Web Solutions
ONE/Northwest - Online Networking for the Environment
http://www.onenw.org
Yuri-11 () Re: Archetype/Dynamic URL?
Reply Threaded More More options
Print post
Permalink
>
> Developing Plone products is a nightmare for newbies. Are there any
> online guides/books that teaches you just how to create a full plone
>  
product?

> I seem to be unable to find any at all. Not the ambigious -> here is
>  
the

> basic file structure, now use psychic powers to fill the files up with
> advanced xml and python and hope everything works. ='( Plone makes
>  
newbie

> developers cry.

well, using archgenxml let you develop and learn in almost a week, I've
experimented it with a newbie :)

Or use paster, for the skeleton.

 If you mean "I want to do it the php way", it does not work, there are
no .php pages to fill the code in.

_______________________________________________
Product-Developers mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/product-developers
Aprilz () Re: Archetype/Dynamic URL?
Reply Threaded More More options
Print post
Permalink
I completed the task by simply making it directory?id=xxx and getting the querystring using self.REQUEST, and did all the functions in one single directory class. And all the html tables for displaying are also dumped into the python class. ZPT stuff seems to too inflexible. Maybe I should have added a dummy user class to make the url look better.

Thanks guys for the response.

Saw the "Professional Plone Development" sometime ago, but it's just basics as usual.
Nothing on dynamic URL or something. Maybe Plone doesn't support it?
No one has ever done "/xxx/id_number_or_attribute_value" with Plone?

---
I did use paster for skeleton. But then I was just stuck with just a skeleton and flesh was hard to find. Haha. Too many useless folders and namespaces things that I removed.

It was just a simple application, and registering everything was ok. Just no solution for the url question yet. Will archgenxml manipulate urls?

"If you mean "I want to do it the php way", it does not work, there are no .php pages to fill the code in."

Yes, we know how simple and awesome php is. But I hadn't meant anything close to that :)

Sometimes life doesn't give you lemons (assuming lemon is something you'd want), and I am flexible with nightmarish stuff.
Take java - confusing xml configurations in multiple files in multiple locations, gazillion folder levels and cryptic error messages (just like Plone). But it is much easier to search solutions and tutorials online. And way less imports for every little function. Less of a nightmare with netbeans/eclipse.

Plone is so complex even the plain vanilla install loads... so... very... slow. Zzz... Create new product add-on? Nooooo...

I feel that Plone has a slightly more secretive and proud community. Like they think Plone owns all or something!
(An example statement quoted above. And so does the expensive Plone consultant, who still got stuck with many of its problems.)
Or maybe just Plone is still young...
David Bain-5 () Re: Archetype/Dynamic URL?
Reply Threaded More More options
Print post
Permalink
Aprilz,
It is evident that you found Plone difficult to approach, but you persisted enough to find a way around the issue. (I may have completely misunderstood what you're saying, so please feel free to correct me on that first statement). One of the goals of Plone 4 is to make it more approachable. We certainly wouldn't want persons to run away screaming for any of the reasons you have mentioned.

You mentioned:
1. speed (too slow)
2. too complex (things in too many places)
3. secretive and proud community (this hasn't been my experience, so I'm definitely surprised about that one)
4. The most prominent manual (Professional Plone Development) is not in depth enough (again, this hasn't been my experience, but I respect your perspective).

Hope I got that right.

Do you have suggestions from your experience as to what would make Plone more approachable for you?

Also, was there anything positive that you'd say was a valuable?

BTW, if I understand you correctly you eventually did most of the "work" in a python class, instead of leaking business logic into page templates, if this is correct, then you did the right thing.


On Thu, Jul 2, 2009 at 10:18 AM, Aprilz <[hidden email]> wrote:

I completed the task by simply making it directory?id=xxx and getting the
querystring using self.REQUEST, and did all the functions in one single
directory class. And all the html tables for displaying are also dumped into
the python class. ZPT stuff seems to too inflexible. Maybe I should have
added a dummy user class to make the url look better.

Thanks guys for the response.

Saw the "Professional Plone Development" sometime ago, but it's just basics
as usual.
Nothing on dynamic URL or something. Maybe Plone doesn't support it?
No one has ever done "/xxx/id_number_or_attribute_value" with Plone?

---
I did use paster for skeleton. But then I was just stuck with just a
skeleton and flesh was hard to find. Haha. Too many useless folders and
namespaces things that I removed.

It was just a simple application, and registering everything was ok. Just no
solution for the url question yet. Will archgenxml manipulate urls?

"If you mean "I want to do it the php way", it does not work, there are no
.php pages to fill the code in."

Yes, we know how simple and awesome php is. But I hadn't meant anything
close to that :)

Sometimes life doesn't give you lemons (assuming lemon is something you'd
want), and I am flexible with nightmarish stuff.
Take java - confusing xml configurations in multiple files in multiple
locations, gazillion folder levels and cryptic error messages (just like
Plone). But it is much easier to search solutions and tutorials online. And
way less imports for every little function. Less of a nightmare with
netbeans/eclipse.

Plone is so complex even the plain vanilla install loads... so... very...
slow. Zzz... Create new product add-on? Nooooo...

I feel that Plone has a slightly more secretive and proud community. Like
they think Plone owns all or something!
(An example statement quoted above. And so does the expensive Plone
consultant, who still got stuck with many of its problems.)
Or maybe just Plone is still young...
--
View this message in context: http://n2.nabble.com/Archetype-Dynamic-URL--tp3176774p3195655.html
Sent from the Product Developers mailing list archive at Nabble.com.


_______________________________________________



--
SplashStart - Professional Websites. Starting Now.
http://www.splashstart.com


_______________________________________________
Product-Developers mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/product-developers
Hedley Roos-2 () Re: Archetype/Dynamic URL?
Reply Threaded More More options
Print post
Permalink
In reply to this post by Aprilz
> Saw the "Professional Plone Development" sometime ago, but it's just basics
> as usual.
You are being unfairly dismissive of a good resource. Had it simply
been "basics as usual" you should have been able to do the "dynamic
url" since that is a basic problem.

Plone has an extremely helpful group of people. You will always find a
courteous answer on the lists. Just look at how David is taking a
genuine interest in what you found difficult.

Hedley

_______________________________________________
Product-Developers mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/product-developers
Derek Broughton-3 () Re: Archetype/Dynamic URL?
Reply Threaded More More options
Print post
Permalink
In reply to this post by David Bain-5
David Bain wrote:

> You mentioned:
> 1. speed (too slow)

Sometimes - but I mostly find this is when running on test servers that are
really obsolete.  My production servers never seem slow - otoh, they're not
terribly busy, either, so I can't say this _isn't_ true.

> 2. too complex (things in too many places)

Often

> 3. secretive and proud community (this hasn't been my experience, so I'm
> definitely surprised about that one)

There is, as always in OSS, a lot of insistence that everything is
adequately documented and available to anybody who googles properly.  That's
_not_ my experience, but if one persists you can get lots of help.

> 4. The most prominent manual (Professional Plone Development) is not in
> depth enough (again, this hasn't been my experience, but I respect your
> perspective).

I have gone beyond what Martin describes - but generally if I do, I have a
dreadful feeling I'm doing things the Wrong Way.  :-)
--
derek



_______________________________________________
Product-Developers mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/product-developers
Aprilz () Re: Archetype/Dynamic URL?
Reply Threaded More More options
Print post
Permalink
In reply to this post by David Bain-5
Ok I may have been to quick to say that it is a proud community, I probably just found the previous Plone consultant that came over laughable, who had a "Plone can do everything!" mantra. Haha... Plus he encountered so many problems, as if broken stuff and fixing a gazillion problems were all a daily part working with of Plone! Made few of us newbies felt very worried. Other than that, he's a nice guy like other plone people.

The manuals were confusing for us; the other newbies gave up.
I copied parts from existing products instead, all while not knowing what they meant. But it kind of worked... So I'm relieved :) And that's a positive thing.

I believe that basic products that allow you to add stuff into forms and display the form data would have been easy and is covered extensively in the manuals. But my task didn't need any forms...

But I still have a nagging feeling that putting so much html code into a python class is wrong?
Like many many lines of: html += "<td id="xxx">"+something+"</td>"

David Bain-5 wrote:
Aprilz,
It is evident that you found Plone difficult to approach, but you persisted
enough to find a way around the issue. (I may have completely misunderstood
what you're saying, so please feel free to correct me on that first
statement). One of the goals of Plone 4 is to make it more approachable. We
certainly wouldn't want persons to run away screaming for any of the reasons
you have mentioned.

You mentioned:
1. speed (too slow)
2. too complex (things in too many places)
3. secretive and proud community (this hasn't been my experience, so I'm
definitely surprised about that one)
4. The most prominent manual (Professional Plone Development) is not in
depth enough (again, this hasn't been my experience, but I respect your
perspective).

Hope I got that right.

Do you have suggestions from your experience as to what would make Plone
more approachable for you?

Also, was there anything positive that you'd say was a valuable?

BTW, if I understand you correctly you eventually did most of the "work" in
a python class, instead of leaking business logic into page templates, if
this is correct, then you did the right thing.
David Bain-5 () Re: Archetype/Dynamic URL?
Reply Threaded More More options
Print post
Permalink


On Fri, Jul 3, 2009 at 11:01 AM, Aprilz <[hidden email]> wrote:

Ok I may have been to quick to say that it is a proud community, I probably
just found the previous Plone consultant that came over laughable, who had a
"Plone can do everything!" mantra. Haha... Plus he encountered so many
problems, as if broken stuff and fixing a gazillion problems were all a
daily part working with of Plone! Made few of us newbies felt very worried.
Other than that, he's a nice guy like other plone people.
Sometimes I get the "Plone can do everything" feeling myself, so I understand.
 Have to constantly remind myself, it's a cms, it's a cms and is strongest with "cmsy" stuff.

The manuals were confusing for us; the other newbies gave up.
I copied parts from existing products instead, all while not knowing what
they meant. But it kind of worked... So I'm relieved :) And that's a
positive thing.
Good to know. Actually, I learnt alot about Plone by looking at other persons' code.  I guess the same is true for CSS (looking at csszengarden.com) or for HTML (view source).
 

I believe that basic products that allow you to add stuff into forms and
display the form data would have been easy and is covered extensively in the
manuals. But my task didn't need any forms...
Yeah, for products that don't need forms you'll want to become familiar with browser views.
The idea is that you "register" a view in a zcml file, a typical view includes a python (.py file) and a template (.pt file).
 

But I still have a nagging feeling that putting so much html code into a
python class is wrong?
Like many many lines of: html += "<td id="xxx">"+something+"</td>"

Yeah... html in .py files is bad. You'll need to read up on ZPT. in the context of browser views any methods in the .py file can be accessed as view/{mymethod} in the ZPT file.

Hope this stuff helps. Very sorry about your poor initial introduction to Plone :(.


David Bain-5 wrote:
>
> Aprilz,
> It is evident that you found Plone difficult to approach, but you
> persisted
> enough to find a way around the issue. (I may have completely
> misunderstood
> what you're saying, so please feel free to correct me on that first
> statement). One of the goals of Plone 4 is to make it more approachable.
> We
> certainly wouldn't want persons to run away screaming for any of the
> reasons
> you have mentioned.
>
> You mentioned:
> 1. speed (too slow)
> 2. too complex (things in too many places)
> 3. secretive and proud community (this hasn't been my experience, so I'm
> definitely surprised about that one)
> 4. The most prominent manual (Professional Plone Development) is not in
> depth enough (again, this hasn't been my experience, but I respect your
> perspective).
>
> Hope I got that right.
>
> Do you have suggestions from your experience as to what would make Plone
> more approachable for you?
>
> Also, was there anything positive that you'd say was a valuable?
>
> BTW, if I understand you correctly you eventually did most of the "work"
> in
> a python class, instead of leaking business logic into page templates, if
> this is correct, then you did the right thing.
--
View this message in context: http://n2.nabble.com/Archetype-Dynamic-URL--tp3176774p3202102.html
Sent from the Product Developers mailing list archive at Nabble.com.


_______________________________________________
Product-Developers mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/product-developers



--
SplashStart - Professional Websites. Starting Now.
http://www.splashstart.com


_______________________________________________
Product-Developers mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/product-developers
David Bain-5 () Re: Archetype/Dynamic URL?
Reply Threaded More More options
Print post
Permalink
@Aprilz,
BTW... here's a good intro to browser views:
http://plone.org/documentation/tutorial/customization-for-developers/zope-3-browser-views

Though I get the feeling that  you may be a bit beyond the basics.

On Fri, Jul 3, 2009 at 12:39 PM, David Bain <[hidden email]> wrote:


On Fri, Jul 3, 2009 at 11:01 AM, Aprilz <[hidden email]> wrote:

Ok I may have been to quick to say that it is a proud community, I probably
just found the previous Plone consultant that came over laughable, who had a
"Plone can do everything!" mantra. Haha... Plus he encountered so many
problems, as if broken stuff and fixing a gazillion problems were all a
daily part working with of Plone! Made few of us newbies felt very worried.
Other than that, he's a nice guy like other plone people.
Sometimes I get the "Plone can do everything" feeling myself, so I understand.
 Have to constantly remind myself, it's a cms, it's a cms and is strongest with "cmsy" stuff.

The manuals were confusing for us; the other newbies gave up.
I copied parts from existing products instead, all while not knowing what
they meant. But it kind of worked... So I'm relieved :) And that's a
positive thing.
Good to know. Actually, I learnt alot about Plone by looking at other persons' code.  I guess the same is true for CSS (looking at csszengarden.com) or for HTML (view source).
 

I believe that basic products that allow you to add stuff into forms and
display the form data would have been easy and is covered extensively in the
manuals. But my task didn't need any forms...
Yeah, for products that don't need forms you'll want to become familiar with browser views.
The idea is that you "register" a view in a zcml file, a typical view includes a python (.py file) and a template (.pt file).
 

But I still have a nagging feeling that putting so much html code into a
python class is wrong?
Like many many lines of: html += "<td id="xxx">"+something+"</td>"

Yeah... html in .py files is bad. You'll need to read up on ZPT. in the context of browser views any methods in the .py file can be accessed as view/{mymethod} in the ZPT file.

Hope this stuff helps. Very sorry about your poor initial introduction to Plone :(.


David Bain-5 wrote:
>
> Aprilz,
> It is evident that you found Plone difficult to approach, but you
> persisted
> enough to find a way around the issue. (I may have completely
> misunderstood
> what you're saying, so please feel free to correct me on that first
> statement). One of the goals of Plone 4 is to make it more approachable.
> We
> certainly wouldn't want persons to run away screaming for any of the
> reasons
> you have mentioned.
>
> You mentioned:
> 1. speed (too slow)
> 2. too complex (things in too many places)
> 3. secretive and proud community (this hasn't been my experience, so I'm
> definitely surprised about that one)
> 4. The most prominent manual (Professional Plone Development) is not in
> depth enough (again, this hasn't been my experience, but I respect your
> perspective).
>
> Hope I got that right.
>
> Do you have suggestions from your experience as to what would make Plone
> more approachable for you?
>
> Also, was there anything positive that you'd say was a valuable?
>
> BTW, if I understand you correctly you eventually did most of the "work"
> in
> a python class, instead of leaking business logic into page templates, if
> this is correct, then you did the right thing.
--
View this message in context: http://n2.nabble.com/Archetype-Dynamic-URL--tp3176774p3202102.html
Sent from the Product Developers mailing list archive at Nabble.com.


_______________________________________________
Product-Developers mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/product-developers



--
SplashStart - Professional Websites. Starting Now.
http://www.splashstart.com




--
SplashStart - Professional Websites. Starting Now.
http://www.splashstart.com


_______________________________________________
Product-Developers mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/product-developers