[2.1.1-java] Building sign up/log in form

265 views
Skip to first unread message

Xipe Totec

unread,
Aug 19, 2013, 5:33:40 AM8/19/13
to play-fr...@googlegroups.com
Hi, I have to implement in my app a system for user registration and login with these features:
  1. sign up with validation (and captcha) creating new account on my app 
  2. login with Facebook, Twitter, ecc
  3. account activation by clicking a link send by email
  4. password recovery when lost
  5. form for change password
  6. logout
I'm thinking if developing this from scratch or using a module. To develop it from scratch I should study how to do it and what I will get at end probably is not better than a stable module.
I'd like to know your opinion about that (especially from "pro" developers). And in case, what module do you reccomend?
The most important thing is to have high control on the code, in the way I can understand it and edit/add/remove functions.

Xipe Totec

unread,
Sep 3, 2013, 10:48:13 AM9/3/13
to play-fr...@googlegroups.com
no one?

Martin Grotzke

unread,
Sep 3, 2013, 1:48:56 PM9/3/13
to play-fr...@googlegroups.com

Check out securesocial, it provides the functionality you mentioned, except the captcha (which would be a nice contribution :-)).

Cheers,
Martin

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Xipe Totec

unread,
Sep 4, 2013, 3:29:03 AM9/4/13
to play-fr...@googlegroups.com, martin....@googlemail.com
Hi martin, thanks for answer
I already know securesocial and other plugin (also play-authenticate) but my question is more "philosophical": is better, in your opinion, build it from scratch or use a plugin? What pro-developers do in this case?

Martin Grotzke

unread,
Sep 4, 2013, 4:08:13 AM9/4/13
to play-fr...@googlegroups.com
On 09/04/2013 09:29 AM, Xipe Totec wrote:
> Hi martin, thanks for answer
> I already know securesocial and other plugin (also play-authenticate)
> but my question is more "philosophical": is better, in your
> opinion, build it from scratch or use a plugin?

If the plugin basically suits your needs I always prefer using this
instead of inventing the wheel again. If you spend half the time of what
it would it had taken you to build it on your own for improving the
chosen library then the open source world got even better.

The advantages of chosing an existing library are IMHO
* better quality (in terms of bugs) out of the box (if the lib is
actually used)
* better documentation
* improvements / bugfixing is not only done by your team
* overall sustainability: if the project is active it's often better
supported than an in house developed solution in the long term

The main disadvantages of an external lib IMHO are
* less flexibility (assuming you don't want to fork completely but stick
to the main development and contribute changes back)
* you need to learn foreign code in the first place

Cheers,
Martin



> What pro-developers do
> in this case?
>
> Il giorno martedì 3 settembre 2013 19:48:56 UTC+2, Martin Grotzke ha
> scritto:
>
> Check out securesocial, it provides the functionality you mentioned,
> except the captcha (which would be a nice contribution :-)).
>
> Cheers,
> Martin
>
> Am 03.09.2013 16:48 schrieb "Xipe Totec" <ashra...@gmail.com
> <javascript:>>:
>
> no one?
>
> Il giorno lunedì 19 agosto 2013 11:33:40 UTC+2, Xipe Totec ha
> scritto:
>
> Hi, I have to implement in my app a system for user
> registration and login with these features:
>
> 1. sign up with validation (and captcha) creating new
> account on my app
> 2. login with Facebook, Twitter, ecc
> 3. account activation by clicking a link send by email
> 4. password recovery when lost
> 5. form for change password
> 6. logout
>
> I'm thinking if developing this from scratch or using a
> module. To develop it from scratch I should study how to do
> it and what I will get at end probably is not better than a
> stable module.
> I'd like to know your opinion about that (especially from
> "pro" developers). And in case, what module do you reccomend?
> The most important thing is to have high control on the
> code, in the way I can understand it and edit/add/remove
> functions.
>
> --
> You received this message because you are subscribed to the
> Google Groups "play-framework" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to play-framewor...@googlegroups.com
> <javascript:>.
> For more options, visit https://groups.google.com/groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>

--
inoio gmbh - http://inoio.de
Schulterblatt 36, 20357 Hamburg
Amtsgericht Hamburg, HRB 123031
Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn

signature.asc

Xipe Totec

unread,
Sep 4, 2013, 11:05:17 AM9/4/13
to play-fr...@googlegroups.com, martin....@googlemail.com
Yes, I agree with you.
About flexibility (important to me): I'm trying securesocial and the first thing I have to do is change sign up form because I need more fields (and more complex logics about the extra fields for facebook logged users). I've already see that this edit on securesocial (but I think it's the same on other ones) isn't so simple, and I should study all the codes and this takes time. Am I right?
In this case, maybe, it's better to write the system from scratch, but I'm new to Java framework then I don't know how much time and complexity it gets. What do you think?

And: I can't find on the web a single good tutorial about building a sign-up/sign-in system for play! :\ Some helps?

Patrick Kraus

unread,
Sep 4, 2013, 12:31:47 PM9/4/13
to play-fr...@googlegroups.com
Nowadays the approach is:

- first, do it
- then, do it right
- then, do it fast

I'd suggest to use as much existing code as possible and then tweak it as you need it. Especially in java there is a lot of existing code.

So one probably ends up spending 70% of the time reading and understanding existing code and only 30% actually coding.

You can never go around adjusting your existing code as your application evolves.
Refactoring and rewriting code are part of the game called object oriented software development.

Happy programming!

Xipe Totec

unread,
Sep 9, 2013, 7:47:13 AM9/9/13
to play-fr...@googlegroups.com
In case I'll decide to build it from scratch, someone could link a tutorial to do that?
I'm searching on the web but I can't find nothing


Il giorno lunedì 19 agosto 2013 11:33:40 UTC+2, Xipe Totec ha scritto:

Xipe Totec

unread,
Oct 14, 2013, 12:34:16 PM10/14/13
to play-fr...@googlegroups.com
No one who knows a basic tutorial?

Carlo Polisini

unread,
Oct 14, 2013, 2:29:20 PM10/14/13
to play-fr...@googlegroups.com
Hi Xine, 
In the project I am working I have same requirements of you, and even more, and I using Play Authenticate with Deadbolt, and I am fine with them.
I think is a flexible plugin, you can add all the fields you need, in the sign up and sign in form. I only had some difficulties since my play framework app is just acting as a REST API interface, and Play authenticate uses some predefined redirects between views or sending emails for verification, but I could overcome those problems overriding some methods.

Anyway, to answer your question, I dont think you will find a tutorial that fits your specifics needs. A good tutorial could be to look at the code of Play authenticate and Deadbolt plugin, you will learn a lot, and maybe you can decide yourself if they fits your needs.

Xipe Totec

unread,
Nov 7, 2013, 4:52:47 AM11/7/13
to play-fr...@googlegroups.com
Hi,
I'm studying the plugin Play authenticate and learn a lot! Then I'm building my own but don't understand what is Deadbolt. Substantially I built my own system that works and I don't need anything else, then I don't know what is Deadbolt and what it does? Is it needed?

Will Sargent

unread,
Nov 7, 2013, 10:24:29 AM11/7/13
to play-fr...@googlegroups.com, Xipe Totec
Play Authenticate does authentication: who are you.

Deadbolt does authorization: are you allowed to do this.



-- 
Will Sargent
Consultant, Typesafe

From: Xipe Totec Xipe Totec
Reply: play-fr...@googlegroups.com play-fr...@googlegroups.com
Date: November 7, 2013 at 1:53:08 AM
To: play-fr...@googlegroups.com play-fr...@googlegroups.com
Subject:  [play-framework] Re: [2.1.1-java] Building sign up/log in form
--

You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Xipe Totec

unread,
Nov 8, 2013, 3:23:01 AM11/8/13
to play-fr...@googlegroups.com, Xipe Totec
Thanks.These systems (authentication and authorization) are too complex to build (for a medium skilled developer) that is reccomended to use existing plugins? 
Because I'd like to develop them from scratch. Play doesn't have "helpers" to realize these functions? 

Fernando Correia

unread,
Nov 8, 2013, 6:41:04 AM11/8/13
to play-fr...@googlegroups.com
I recommend reading SecureSocial's source code for examples of views and controllers for signup, login, etc.
Reply all
Reply to author
Forward
0 new messages