You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Jing Ge (Besitec IT DEHAM)" <JG...@besitec.com> on 2010/02/26 11:35:00 UTC

Role-based wicket application

Hello guys,

 

We have been using wicket since more than one year. It is very
comfortable to work with wicket and "live" here in this community.
Thanks you guys!

 

Now we want to add more features into our application and we get a
(actually very common) problem: 

 

What is the correct way for building a role-based wicket application?

 

The requirement is something like this: 

 

1.  Users are assigned to different roles, or groups, or projects.

2.  Some pages looks similar to the users of different roles. But they
are not same.

 

We have thought about it for a while and get some ideas:

 

1.       One application for all roles and one page for all roles. (with
"if.. else" maybe, we know it is not good). Is it possible with wicket?
Since the wicket:id, that is defined in the html , must be added in the
java class. Maybe show/hide it for different roles? 

2.       One application for all roles but one page for each role. The
drawback is the duplicated code & logic. This could be solved by class
inheritance. But the html files are still duplicated.

3.       One application for each role.  Build a base project and then
let other projects inheritance from the base one.

 

We know that the third choice is not good (actually very bad from the
technical point of view, has a lot of problems for changes, release,
deployment, etc.), but it has also one real great benefit: role relevant
changes will be limited only to the users of that role. That means, for
such changes, only the application for that role needed to be updated,
redeployed, and restarted. 

 

Is there any features of wicket can solve such problem? Does anyone of
you guys has some better ideas? We appreciate any suggestions, guides,
helps, etc. Thanks!

 

Best regards

Jing


Re: Role-based wicket application

Posted by James Carman <jc...@carmanconsulting.com>.
Have you looked into wicket-auth-roles?

On Fri, Feb 26, 2010 at 5:35 AM, Jing Ge (Besitec IT DEHAM)
<JG...@besitec.com> wrote:
> Hello guys,
>
>
>
> We have been using wicket since more than one year. It is very
> comfortable to work with wicket and "live" here in this community.
> Thanks you guys!
>
>
>
> Now we want to add more features into our application and we get a
> (actually very common) problem:
>
>
>
> What is the correct way for building a role-based wicket application?
>
>
>
> The requirement is something like this:
>
>
>
> 1.  Users are assigned to different roles, or groups, or projects.
>
> 2.  Some pages looks similar to the users of different roles. But they
> are not same.
>
>
>
> We have thought about it for a while and get some ideas:
>
>
>
> 1.       One application for all roles and one page for all roles. (with
> "if.. else" maybe, we know it is not good). Is it possible with wicket?
> Since the wicket:id, that is defined in the html , must be added in the
> java class. Maybe show/hide it for different roles?
>
> 2.       One application for all roles but one page for each role. The
> drawback is the duplicated code & logic. This could be solved by class
> inheritance. But the html files are still duplicated.
>
> 3.       One application for each role.  Build a base project and then
> let other projects inheritance from the base one.
>
>
>
> We know that the third choice is not good (actually very bad from the
> technical point of view, has a lot of problems for changes, release,
> deployment, etc.), but it has also one real great benefit: role relevant
> changes will be limited only to the users of that role. That means, for
> such changes, only the application for that role needed to be updated,
> redeployed, and restarted.
>
>
>
> Is there any features of wicket can solve such problem? Does anyone of
> you guys has some better ideas? We appreciate any suggestions, guides,
> helps, etc. Thanks!
>
>
>
> Best regards
>
> Jing
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Role-based wicket application

Posted by "Jing Ge (Besitec IT DEHAM)" <JG...@besitec.com>.
Hi,

Thank you and James for the reply.

I'v read the Wicket in action book and knew the interface IAuthorizationStrategy. Just implemnenting it(like the book introduces) will force us building a lot of classes and a lot of code in that two methods for authorization handling. Following your suggestion I read the document of wicket-security and think it could be suitable for our requirement. Thanks!

further questions:

- Does wicket-security 1.4-snapshot work well with wicket 1.4?
- Any roadmap for the wicket-security 1.4 final version?

Best regards
Jing

-----Original Message-----
From: Early Morning [mailto:goodmorning.no@gmail.com] 
Sent: Montag, 1. März 2010 04:51
To: users@wicket.apache.org
Subject: Re: Role-based wicket application

Hi,

We just use one application/page for all roles, otherwise, you'd have a hard
time maintaining everything especially if you have dynamic roles. Wicket has
an interface you can implement for authorization (IAuthorizationStrategy);
there are also existing projects that implement it for you as well and cover
the general use case such as wicket-auth-roles and wicket-security. However,
we just implemented our own IAuthorizationStrategy since we have an existing
role-based system from older applications so I haven't had much experience
with the existing projects. The basics of implementing your own are covered
pretty well in the Wicket in Action book as well, but if the existing
projects cover your needs then you should be able to use them pretty easily.




On Fri, Feb 26, 2010 at 6:35 PM, Jing Ge (Besitec IT DEHAM) <JGe@besitec.com
> wrote:

> Hello guys,
>
>
>
> We have been using wicket since more than one year. It is very
> comfortable to work with wicket and "live" here in this community.
> Thanks you guys!
>
>
>
> Now we want to add more features into our application and we get a
> (actually very common) problem:
>
>
>
> What is the correct way for building a role-based wicket application?
>
>
>
> The requirement is something like this:
>
>
>
> 1.  Users are assigned to different roles, or groups, or projects.
>
> 2.  Some pages looks similar to the users of different roles. But they
> are not same.
>
>
>
> We have thought about it for a while and get some ideas:
>
>
>
> 1.       One application for all roles and one page for all roles. (with
> "if.. else" maybe, we know it is not good). Is it possible with wicket?
> Since the wicket:id, that is defined in the html , must be added in the
> java class. Maybe show/hide it for different roles?
>
> 2.       One application for all roles but one page for each role. The
> drawback is the duplicated code & logic. This could be solved by class
> inheritance. But the html files are still duplicated.
>
> 3.       One application for each role.  Build a base project and then
> let other projects inheritance from the base one.
>
>
>
> We know that the third choice is not good (actually very bad from the
> technical point of view, has a lot of problems for changes, release,
> deployment, etc.), but it has also one real great benefit: role relevant
> changes will be limited only to the users of that role. That means, for
> such changes, only the application for that role needed to be updated,
> redeployed, and restarted.
>
>
>
> Is there any features of wicket can solve such problem? Does anyone of
> you guys has some better ideas? We appreciate any suggestions, guides,
> helps, etc. Thanks!
>
>
>
> Best regards
>
> Jing
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Role-based wicket application

Posted by Early Morning <go...@gmail.com>.
Hi,

We just use one application/page for all roles, otherwise, you'd have a hard
time maintaining everything especially if you have dynamic roles. Wicket has
an interface you can implement for authorization (IAuthorizationStrategy);
there are also existing projects that implement it for you as well and cover
the general use case such as wicket-auth-roles and wicket-security. However,
we just implemented our own IAuthorizationStrategy since we have an existing
role-based system from older applications so I haven't had much experience
with the existing projects. The basics of implementing your own are covered
pretty well in the Wicket in Action book as well, but if the existing
projects cover your needs then you should be able to use them pretty easily.




On Fri, Feb 26, 2010 at 6:35 PM, Jing Ge (Besitec IT DEHAM) <JGe@besitec.com
> wrote:

> Hello guys,
>
>
>
> We have been using wicket since more than one year. It is very
> comfortable to work with wicket and "live" here in this community.
> Thanks you guys!
>
>
>
> Now we want to add more features into our application and we get a
> (actually very common) problem:
>
>
>
> What is the correct way for building a role-based wicket application?
>
>
>
> The requirement is something like this:
>
>
>
> 1.  Users are assigned to different roles, or groups, or projects.
>
> 2.  Some pages looks similar to the users of different roles. But they
> are not same.
>
>
>
> We have thought about it for a while and get some ideas:
>
>
>
> 1.       One application for all roles and one page for all roles. (with
> "if.. else" maybe, we know it is not good). Is it possible with wicket?
> Since the wicket:id, that is defined in the html , must be added in the
> java class. Maybe show/hide it for different roles?
>
> 2.       One application for all roles but one page for each role. The
> drawback is the duplicated code & logic. This could be solved by class
> inheritance. But the html files are still duplicated.
>
> 3.       One application for each role.  Build a base project and then
> let other projects inheritance from the base one.
>
>
>
> We know that the third choice is not good (actually very bad from the
> technical point of view, has a lot of problems for changes, release,
> deployment, etc.), but it has also one real great benefit: role relevant
> changes will be limited only to the users of that role. That means, for
> such changes, only the application for that role needed to be updated,
> redeployed, and restarted.
>
>
>
> Is there any features of wicket can solve such problem? Does anyone of
> you guys has some better ideas? We appreciate any suggestions, guides,
> helps, etc. Thanks!
>
>
>
> Best regards
>
> Jing
>
>