Play[2.0] - beginner question

202 views
Skip to first unread message

Kay

unread,
Jul 13, 2012, 11:18:15 PM7/13/12
to play-fr...@googlegroups.com
Hi,
I am new to Java/Play. I am basically a C++ programmer. I have been working on a design for a small finance application for myself. I have been reading about play and its simplicity. So I read the tutorial, but I am kind of lost. Not quite sure where to start. I mean I did not really follow a path that guides me.

I need some good pointers to understand the framework from a "dummy" perspective. The threads here are a bit too much for me. Any help would be greatly appreciated.

Here are my basic questions
a. Does play need linux/unix? Can it run on windows?
b. Does Play follow a UI framework?
c. Can we just write POJO?

Thanks,
Kay

Alex Xandra Albert Sim

unread,
Jul 14, 2012, 1:07:28 AM7/14/12
to play-fr...@googlegroups.com
Here are my basic questions
a. Does play need linux/unix? Can it run on windows?

No, play does not need linux / unix. You can run it in Windows as long as you have Java / Scala installed. By Java / Scala I mean JRE, JDK, and other softwares that you need to run Java / Scala. All of it runs on Windows too. In fact, 100% of my development work is in Windows.
 
b. Does Play follow a UI framework?

Could you please elaborate what do you mean by UI framework? Something like Qt in C++ world?

If it's something like Qt, in the web world we use HTML for displaying things (like QML in Qt world), CSS for designing the HTML and Javascript for interactivity. There's  a lot of CSS and Javascript frameworks, and each one of them has their own toolchain / framework. Play should support them all since they are client side code. They run in browser (in contrast to Play which run in server).

If it's nothing lke Qt, please explain more about your definiiton of "UI Framework".
 
c. Can we just write POJO?

I don't think we can, but I'll let someone answer this since I'm not sure. 

Hope this helps.

Marcos Pereira

unread,
Jul 14, 2012, 3:30:59 PM7/14/12
to play-fr...@googlegroups.com
About POJOs, you can write them, but it requires more work, which maybe is not the best approach, since the whole point of using a framework is to do less work.

I just wrote a gist to show how to use POJOs:


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/C-jxOloOwCoJ.

To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Kay

unread,
Jul 15, 2012, 12:00:27 AM7/15/12
to play-fr...@googlegroups.com
Hi Marcos,

Thanks a lot. I definitely dont want to write my own classes for modes/controllers. I wanted my classes to derive from the base "play" classes. But If I have some business logic, I can write my own classes and call them from the respective play derived classes - correct?

Please advice.

Thanks,
Kay


On Saturday, July 14, 2012 3:30:59 PM UTC-4, Marcos Silva Pereira wrote:
About POJOs, you can write them, but it requires more work, which maybe is not the best approach, since the whole point of using a framework is to do less work.

I just wrote a gist to show how to use POJOs:


On Sat, Jul 14, 2012 at 2:07 AM, Alex Xandra Albert Sim <bert...@gmail.com> wrote:
Here are my basic questions
a. Does play need linux/unix? Can it run on windows?

No, play does not need linux / unix. You can run it in Windows as long as you have Java / Scala installed. By Java / Scala I mean JRE, JDK, and other softwares that you need to run Java / Scala. All of it runs on Windows too. In fact, 100% of my development work is in Windows.
 
b. Does Play follow a UI framework?

Could you please elaborate what do you mean by UI framework? Something like Qt in C++ world?

If it's something like Qt, in the web world we use HTML for displaying things (like QML in Qt world), CSS for designing the HTML and Javascript for interactivity. There's  a lot of CSS and Javascript frameworks, and each one of them has their own toolchain / framework. Play should support them all since they are client side code. They run in browser (in contrast to Play which run in server).

If it's nothing lke Qt, please explain more about your definiiton of "UI Framework".
 
c. Can we just write POJO?

I don't think we can, but I'll let someone answer this since I'm not sure. 

Hope this helps.

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/C-jxOloOwCoJ.

To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.

Kay

unread,
Jul 15, 2012, 12:35:11 AM7/15/12
to play-fr...@googlegroups.com
Hi Alex,
This definitely helps.
But the very reason I wanted to try this is due to Java and I have a decent knowledge of Java. But is Scala a must to work with play framework?

Regarding the UI framework, I wanted to see if I have to create a CRUD screen, I dont have to write that for every Database table instead I have a common UI class that I can derive from for all my different tables. Does it even make sense? Please let me know.
Can you please suggest a easy CSS Javascript framework?

At the end of the day I am looking to create a CRUD screen in play framework just using Java. (of course with java classes derived from play framwork classes).

Alex Xandra Albert Sim

unread,
Jul 18, 2012, 10:53:18 AM7/18/12
to play-fr...@googlegroups.com
On Sunday, 15 July 2012 11:35:11 UTC+7, Kay wrote:
Hi Alex,
This definitely helps.
But the very reason I wanted to try this is due to Java and I have a decent knowledge of Java. But is Scala a must to work with play framework?

As far as I know, you don't need Scala for play framework. The core is written in Scala, but since Scala is compatible with java (you can call scala library from java and vice versa) it should work in Java as well.
 

Regarding the UI framework, I wanted to see if I have to create a CRUD screen, I dont have to write that for every Database table instead I have a common UI class that I can derive from for all my different tables. Does it even make sense? Please let me know.

There's no module like that in the core framework, and as of now, there's no module supporting CRUD generation also :(
You might want to watch this page in case of some module for CRUD comes out: https://github.com/playframework/Play20/wiki/Modules
 
Can you please suggest a easy CSS Javascript framework?

For CSS I use Twitter Bootstrap, and for Javascript jQuery is nice (and almost everywhere :p).
 

At the end of the day I am looking to create a CRUD screen in play framework just using Java. (of course with java classes derived from play framwork classes).

This is definitely possible, just a lot of work for now (compared to other framework). Another alternative is to use play framework 1, which has a CRUD generator.

Regards,

opensource21

unread,
Jul 18, 2012, 1:46:54 PM7/18/12
to play-fr...@googlegroups.com
I start playing to build a CRUD but there was no interest so I stopped. See https://groups.google.com/d/topic/play-framework/Ol7-xbxkA4M/discussion based on this I fear there wan't be a solution in the near future. Perhaps a scaffolding approach in 2.1
Niels

Will Sargent

unread,
Jul 18, 2012, 4:23:34 PM7/18/12
to play-fr...@googlegroups.com
On Wed, Jul 18, 2012 at 10:46 AM, opensource21 <openso...@gmail.com> wrote:
> I start playing to build a CRUD but there was no interest so I stopped. See
> https://groups.google.com/d/topic/play-framework/Ol7-xbxkA4M/discussion
> based on this I fear there wan't be a solution in the near future. Perhaps a
> scaffolding approach in 2.1

A scaffolding solution based on giter8 is planned in 2.1.

https://groups.google.com/d/msg/play-framework/xHPpFQFJjJg/LDNWyB8XvygJ

Will.
Reply all
Reply to author
Forward
0 new messages