Jason Mayer

Ranch Hand
+ Follow
since Oct 16, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jason Mayer

it looks like you're new to java, so i'd recommend using an external library such as parse for this. they handle all the security parts and it's free for up to 1 million api requests per month. I'm not new to java and I'm using it in my android app because it made getting started that much easier.
http://www.parse.com
9 years ago
Great, thanks!
10 years ago
I'm about to start doing some work on an app that uses mongo for the DB, but the site is in rails. Would this book be Java specific or would it be easily portable to ruby/rails?
10 years ago
Thanks, I guess I should have updated my thread a year ago or so when I finally came to that answer.

In the case of anyone else who comes along via google, I believe the following is what's needed to prevent guests from seeing the portlet. Please correct me if I'm wrong. This needs to be in a file under WEB-INF/classes/resource-actions if I recall correctly.

10 years ago

Ashish Sarin wrote:Hi Jason,

1. Portlets in Action covers developing portlets using Spring Portlet MVC (a framework meant exclusively for developing portlets) for developing JSR 286 portlets. The chapter on Portlet Bridges covers developing JSF 2 and Wicket portlets.
2. The book covers Liferay 6.0.5 as it is the latest version of Liferay portal.
3. Portlet namespaces is covered in detail with examples. You can download examples from the following location: http://code.google.com/p/portletsinaction/

regards
ashish



And to clarify, in the book do you advocate writing your portlets as individual war files (i think liferay 6 calls them plugins)? I've been trying to find examples of portlets that weren't written in the extension environment, although from what I read recently liferay 6 has changed the extension environment used in 5.x into something new.
11 years ago

Ashish Sarin wrote:Hi Pradeep,

Inter-portlet communication is achieved using one of the following approaches:
- Public render parameters - render parameters available to all the portlets on a portal page
- Portlet events - event-based inter-portlet communication
- Session - portlets can communication via APPLICATION_SCOPEd data

In some scenarios, AJAX is also used to achieve inter-portlet communication. For instance, Portlet A makes an AJAX call on the server and gets some data. The callback method knows the id attribute of an HTML <div> element of another Portlet B, which it uses to modify the content inside the <div> tag of Portlet B. This is not a standard approach.

regards
ashish



If you're using liferay 5, see this page for javascript updating of other portlets: http://www.liferay.com/community/wiki/-/wiki/Main/Client-side+Inter-Portlet+Communication. Liferay 6 also has a slightly different way, but the goal is still the same.
11 years ago
I've been writing portlets for the last 8 months or so and I feel like I'm just starting to get the hang of both Liferay and writing Spring portlets.
Are you using liferay 5.2.3 in this book?
Do you cover jQuery best practices for portlet development, such as namespacing your javascript?
Do you talk about portlet development using Spring mvc or just struts / jsp?
11 years ago
Sounds awesome! Do you cover the eclipse plugin at all? I've been running all my tests from the command line - haven't had an opportunity to check out the plugin.
Lately I've been using jsTestDriver (available on google code) for javascript testing. What frameworks (if any) do you use in this book? Also, I've run into problems where methods call window.setTimeout() and I have had no success in mocking out that call... do you discuss mocking and stubbing to any degree? Lately I've just been mocking out the entire method that has troublesome code and then replacing it after the test is completed. Thanks, looking forward to reading your book
I recently wrote a portlet for liferay using spring mvc. I was told recently that my security is not quite correct, however. I was having the admins configure who could add the portlet through the configuration menu, but that doesn't prevent someone from adding a portlet to the public page of a community and possibly leaking privileged information.

in my portlet.xml i have the following entry

and in my liferay-portlet.xml


The role mapper contains two fields, the role-link, which is the Liferay role, and the role-name, which is what maps to the portlet.xml security-role-ref mapping. Now, the way I understand it, anyone with the Liferay Role "HR Employee" should be able to see the portlet, however, anyone who does not have that role should see an error message about the lack of sufficient roles (or possibly a "portlet has been undeployed" message depending on the settings for Liferay). Do I need to add a security-role mapping to the web.xml similar to this that I just found on an old jboss page(http://docs.jboss.org/jbossas/jboss4guide/r1/html/ch8.chapter.html)?
11 years ago

Michael Sullivan wrote:I agree that preparing GUI apps via Groovy is possible, but considering Swing (or any framework derivative thereof) relatively painless is an interesting proposition.



I'm sorry, but that doesn't answer the question. Is there a comparable framework for making relatively painless desktop applications in Ruby? In other words, has wxRuby remained the only option (and specifically has it matured at all), or is everything still grails-centric/command line.
12 years ago
The relevant slide points to this location: http://shootout.alioth.debian.org/u32q/benchmark.php

As a groovyist, I feel obligated to point out where Ruby is relative to groovy. ;)
12 years ago
A friend of mine once told me that Design Patterns exist mostly as a way to get around limitations in the language. One of the great things about Ruby (and Groovy, since I'm a zealot) is that you don't tend to have those limitations. There might be some performance improvements you can eek out, or more readable ways to write your code, but those tend to come from experience in my opinion.
12 years ago
This is actually kind of interesting. I've only recently started seeing a trend of companies hiring people because they know groovy.
But, since nobody is answering the question of "What exists in Groovy that doesn't exist in Ruby", I'll contribute. One thing that exists in Groovy that didn't exist in Ruby (at the time I was learning it) was a stable gui framework. Griffon and/or SwingBuilder allow one to make relatively painless java desktop apps. Last I checked (and again, it was three years ago), Ruby didn't have any way to do anything like that except for wxRuby which was extremely buggy and not very intuitive. Whenever people would ask on the Ruby mailing list for options, people would say 'Why not do it in rails?' as if that was the only solution. What's changed since 2006 that makes it easier to create a deployable desktop application? This is a question specifically for those times when you do not have the ability to run a server due to some security restriction or another.
12 years ago
I seem to have lost part of my post, so I'll try and recreate what I wrote.

How is the performance? I'm not trying to say that we're going to create the best game to ever be written, but some of the more popular games attract 4+ million users a day. Are there any large scale apps that are out there written in grails?
12 years ago