[appengine-java] HashMap within an Embedded Class
Hey Are you able to store a HashMap within an embedded class? I have a Class which implements Serializable and annotate the HashMap like this: @Persistent(serialized = true, defaultFetchGroup=true) private MapString, Integer myMap; However, I always get this error thrown: myMap: java.util.HashMap is not a supported property type. I assume we can store a HashMap within an embedded Class? Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Feelings about new pricing model
Hi coders, Could people please correct me as I am trying to understand all this, have read quite a few thread/pages but still a bit unsure what is going on exactly. This is what I get so far: - Being charged for instances means we should probably use multi-threading in our apps to avoid significant cost increases, so google is encouraging us to write apps that make more efficient use of memory. - Python developers are piddled off because they can't use multi-threading. Can anyone enlighten me as to when an application that doesn't use multi-threading would require a new instance - when more than 1 request is happening simultaneously? When one JVM can't handle more requests? I am totally confused. I still think GAE is well worth the money. People are complaining about $50/month but I want my app to be making way more than that and I think the tools and support they provide make it way worth it. I just want to make sure I take all these measures into account to make my app as efficient as possible. Drew -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Coding with Adobe Software
Yeah don't bother with Adobe dude, waste of money unless you have invested significant time and money already learning how to become an adobe ninja. Google provides all the stuff you need for free :) so get into GWT and Eclipse. There are a few ways you can design the user interface using GWT: - In Java code, programmatically adding widgets and stuff into the page (see the StockWatcher tutorial) - GWTDesigner - a drag-and-drop interface that writes the Java code for you. - UiBinder - an XML system for designing your main layout in HTML-like format. I am only learning all of this myself but there are lots of tools available to us. Drew -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Feelings about new pricing model
Let's say you have a sustained traffic of 5 hits per second, and each request takes 1 second to process (waiting on the datastore, waiting on facebook, whatever). If you're using single-threaded python, you will need 5 instances to serve this load - each instance can do nothing else while it processes a single request. So, maybe the datastore is behaving well today and you ditched your Facebook integration so you can complete each request in 200ms. Now you only need one instance to serve those 5 hits per second. Now let's say you get slashdotted, and for a day you sustain 500 hits per second. You now need 100 instances. Maybe there's a datastore hiccup and your latency goes up... now you need 200, 300 instances. They consume very little CPU because they spend most of their time blocked waiting for I/O, but they sure do occupy a lot of RAM. An efficient multithreaded (or async) server should be able to handle this load with less than 10 instances, and I/O latency will have minimal impact. Additional concurrent requests consume more CPU but they don't consume more RAM. Nobody is complaining about $50/mo. They're complaining about the looming threat of $500 or $5000 per month for traffic levels that barely register on a less scalable architecture. The Google blog says that appengine served over 2,000 hits per second for the Royal Wedding - I'd like to know what the bill would look like before and after the pricing change. Jeff On Tue, May 24, 2011 at 1:46 AM, Drew Spencer slugmand...@gmail.com wrote: Hi coders, Could people please correct me as I am trying to understand all this, have read quite a few thread/pages but still a bit unsure what is going on exactly. This is what I get so far: Being charged for instances means we should probably use multi-threading in our apps to avoid significant cost increases, so google is encouraging us to write apps that make more efficient use of memory. Python developers are piddled off because they can't use multi-threading. Can anyone enlighten me as to when an application that doesn't use multi-threading would require a new instance - when more than 1 request is happening simultaneously? When one JVM can't handle more requests? I am totally confused. I still think GAE is well worth the money. People are complaining about $50/month but I want my app to be making way more than that and I think the tools and support they provide make it way worth it. I just want to make sure I take all these measures into account to make my app as efficient as possible. Drew -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Backend + push task queue, does it work?
Found more issues. If you have a backends.xml in your project then logging stops working for your local server. Also with backends.xml, you don't see the last log line, stating that the server is running. INFO: The server is running at http://localhost:/ -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Feelings about new pricing model
On Tuesday, May 24, 2011 11:21:00 AM UTC+2, Jeff Schnitzer wrote: The Google blog says that appengine served over 2,000 hits per second for the Royal Wedding - I'd like to know what the bill would look like before and after the pricing change. Indeed, that would be an interesting thing to know. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Feelings about new pricing model
Can't you just limit your maximum number of instances at any one time? In the case of the datastore hiccup surely google would make some sort of adjustment due to their own failures? I see you point and agree wholeheartedly Jeff, I guess I just trust Google to keep it reasonably competitive on price. Otherwise wouldn't we all just move to another service? Drew -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Connect Android Emulator to Google App Engine (GAE) local PC - domain works correctly.
I currently have a working implementation connecting my Android app to my GAE domain site. I was never able to get a working development environment and I always have to use my domain site to actually test my android implementation. I'm using the JAVA JDO implementation of GAE. I ran into some issues with my GAE code and need to debug the request coming from the android using the emulator. I am using the 10.0.2.2: in my android application to access the GAE running locally on the same PC. However, when i make the initial request to login and retrieve the Ascid cookie, no cookie is ever returned to me. Then i tried to use a combination of domain plus localhost (i.e. http://domain.appspot.com/_ah_login?continue=http://10.0.2.2:888/apiauthToken ). This works to get the ASCID cookie back from my domain site, then if i try to use that cookie with my localhost GAE, no user is found in the user service - guessing that the cookie isnt valid for the server running on my localhost. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Java = Google app
maven thoughts - anyone who's worked on a large project over time has seen the build scripts grow in complexity and maintenance costs - maven, like many solutions, introduces a domain-specific-language to simplify things, or in mavens case, a domain specific XML schema - I usually cringe when I see a new dsl. just one more unnatural thing to learn - however in practice, I've seen maven greatly simplify and standardize large scale development (dozens of developers working together on dozens of projects) - as always - UTRTFTJ use the right tool for the job - as for app engine, I don't use a build script. stand-alone eclipse works fine with a few developers on a project On May 23, 8:08 pm, Brandon Donnelson branflake2...@gmail.com wrote: I see nothing wrong with what you said. Its fun to see others perspectives. That's what this group is all about. :) On May 23, 2011 4:58 PM, Rusty Wright rwright.li...@gmail.com wrote: Sorry, my post was slightly tongue in cheek; sometimes I can't resist sticking a twig into a hornet's nest. On 2011-05-23 08:26, Ugorji wrote: +1 all the way to Jeff's comments. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Google App Engine + Java Applet
Doesn't an applet run on the client side? Did you want it to run on the server side? If it does run on the client GAE won't care what you do. Brandon Donnelson http://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Strange behavior by App Engine Eclipse Plugin
In the Development Mode tab, when you see the link, right click on it, you'll get choices of which browser to run. You can set it back to default browser or choose another browser to run. Brandon Donnelson http;//gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: HashMap within an Embedded Class
Here are the supported property types: http://code.google.com/appengine/docs/java/datastore/entities.html#Properties_and_Value_Types You could make an entity that has a key and value properties. Then you could store your values into the entities like the hashmap. You would have to manage the sort with an incremented order value. Brandon Donnelson http://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Connect Android Emulator to Google App Engine (GAE) local PC - domain works correctly.
Can you get your android phone on the 10.0.2.2 private network? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Connect Android Emulator to Google App Engine (GAE) local PC - domain works correctly.
Yes. The emulator does connect to the localhost using 10.0.2.2:888 as the base uri. This is my basic connection routine. I just assumed i could switch out my http://domain.appspot.com for the http://10.0.2.2:/_ah/login url, but this doesnt seem to get me through authentication. It does work for my domain. private HttpResponse makeRequestNoRetry(String urlPath, ListNameValuePair params, boolean newToken, RequestMethod requestMethod) throws Exception { // Get auth token for account mAccountName = PreferenceManager.getDefaultSharedPreferences(mContext).getString(accountName, null); Account account = new Account(mAccountName, com.google); String authToken = getAuthToken(mContext, account); if (newToken) { // invalidate the cached token AccountManager accountManager = AccountManager.get(mContext); accountManager.invalidateAuthToken(account.type, authToken); authToken = getAuthToken(mContext, account); } // Get ACSID cookie DefaultHttpClient client = new DefaultHttpClient(); String continueURL = BASE_URL; URI uri = new URI(AUTH_URL + ?continue= + URLEncoder.encode(continueURL, UTF-8) + auth= + authToken); HttpGet method = new HttpGet(uri); final HttpParams getParams = new BasicHttpParams(); HttpClientParams.setRedirecting(getParams, false); // continue is not used method.setParams(getParams); HttpResponse res = client.execute(method); Header[] headers = res.getHeaders(Set-Cookie); if (res.getStatusLine().getStatusCode() != 302 || headers.length == 0) { return res; } String ascidCookie = null; for (Header header: headers) { if (header.getValue().indexOf(ACSID=) =0) { // let's parse it String value = header.getValue(); String[] pairs = value.split(;); ascidCookie = pairs[0]; } } uri = new URI(BASE_URL + urlPath); HttpUriRequest request = null; if (requestMethod == RequestMethod.GET) { // add parameters String combinedParams = ; if (params != null !params.isEmpty()) { combinedParams += ?; for (NameValuePair p : params) { String paramString = p.getName() + = + URLEncoder.encode(p.getValue(),UTF-8); if (combinedParams.length() 1) { combinedParams += + paramString; } else { combinedParams += paramString; } } } request = new HttpGet(uri + combinedParams); } else { // Make POST request request = new HttpPost(uri); if (params != null !params.isEmpty()) { UrlEncodedFormEntity entity = new UrlEncodedFormEntity(params, UTF-8); ((HttpPost) request).setEntity(entity); } } request.setHeader(Cookie, ascidCookie); request.setHeader(X-Same-Domain, 1); // XSRF res = client.execute(request); return res; } -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: HashMap within an Embedded Class
The issue I have though is HasMap's are supported if serialized=true is set. What I want to determine is why cant I use a HashMap within an embedded class? Thanks On May 24, 2:36 pm, Brandon Donnelson branflake2...@gmail.com wrote: Here are the supported property types:http://code.google.com/appengine/docs/java/datastore/entities.html#Pr... You could make an entity that has a key and value properties. Then you could store your values into the entities like the hashmap. You would have to manage the sort with an incremented order value. Brandon Donnelsonhttp://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Upload blob never calls success path
As I expected in the first place I'm just dumb. After running into a lot of issues (OutOfMemory and alike) I found out that I just forgot to attach the form to the site properly ;-) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Connect Android Emulator to Google App Engine (GAE) local PC - domain works correctly.
I have some questions to help me and others that visit this thread. The servlet container for the GAE dev, I assume its running? And do you know if the servlet request is coming in from the android emulator when made? If your servlet is getting the request, can see if all the body and headers are like you want them? And if the request, how about the response, what does it look like? Brandon Donnelson http://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Connect Android Emulator to Google App Engine (GAE) local PC - domain works correctly.
Sure. Yes, I do know the servlet is running. I was able to put a breakpoint in the GAE servlet to verify the request was hitting the container. Below is an example of my servlet which I was testing with. This servlet just uses the user service to retrieve the user's information. The variable 'user' is always null from the userService.getCurrentUser() request, which will then send me back the response to redirect me to the login page - which shouldn't occur from the Android application. When I use my domain, I have no problems with my request as mentioned before. The auth tocken I get from my google account on my device will allow me to retrieve the cookie to automatically make requests on my api. Unfortunately I am at work at the moment. I will reply here when i get a change to inspect all the request headers coming into the servlet. Is my assumption correct that I should just be able to change the base url to my localhost and the same code should execute? Thanks for the help. Example of my servlet. public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { doPost(req, resp); } public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { UserService userService = UserServiceFactory.getUserService(); User user = userService.getCurrentUser(); if (user != null) { PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = pm.newQuery(Player.class); query.setFilter(userId == userIdParam); query.declareParameters(String userIdParam); ListPlayer users = (ListPlayer) query.execute(user.getUserId()); Player currentPlayer = null; if (!users.isEmpty()) { currentPlayer = users.get(0); } else { System.out.println(Players are empty); currentPlayer = new Player(user); try { pm.makePersistent(currentPlayer); System.out.println(addded new player: + currentPlayer.getUser().getEmail()); } finally { pm.close(); } } Gson gson = new Gson(); String json = gson.toJson(currentPlayer); resp.setContentType(application/json); resp.getWriter().println(json ); } // redirect user to sign-in else { resp.sendRedirect(userService.createLoginURL(req.getRequestURI())); } } -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Connect Android Emulator to Google App Engine (GAE) local PC - domain works correctly.
Yea, changing the url should work. I have to make url modifications depending on local and production. I would check to see if a Cookie is getting sent in the header. Brandon -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Connect Android Emulator to Google App Engine (GAE) local PC - domain works correctly.
I know for sure last night, that no cookie was being sent back in the header. The only way I was able to get a cookie sent back to me is if I used the combination of domain and localhost (i.e. http://domain.appspot.com/_ah/login?continue=http://10.0.2.2:/api/home) or something similar. This was because the domain was sending me back a cookie that I was then trying to use to authenticate against the localhost. I'm not sure if this is correct, but just using the 10.0.2.2: address never sent back a proper cookie. I also noticed in the Developer tools -Resources of Chrome that the cookie names appear different between domain and localhost. One was dev_*something* the other was the ASCID cookie - if that matters. I will debug further to get all the header details of the request. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] List of supported content types in BlobStore?
Hi, is there a list of content types that BlobStore is be able to detect? Thanks, Daniel -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Google App Engine + Java Applet
Yes. It runs on the client side but I would like to host it at GAE. On May 24, 9:27 am, Brandon Donnelson branflake2...@gmail.com wrote: Doesn't an applet run on the client side? Did you want it to run on the server side? If it does run on the client GAE won't care what you do. Brandon Donnelsonhttp://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Persisting an Object that has a List of anotherObject JPA (it's been 5 days now ).
Hello. Here's the problem. An 'Annotation' has a list of 'Tag'. What I want to do is when persisting an annotation (with its list of Tag) I dont want to persist the Tags of the annotations. For example, lets say I previously persisted 3 tags: Tag1 Tag2 Tag3. And now I persist an annotations with a list of tag: Tag1 and Tag2. In the table Tag will appear: Tag1, Tag2,Tag3,Tag1,Tag2. Here's the code: @Entity @Table(name = annotation) public class Annotation implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key id; @Basic @OneToMany(mappedBy = annotation, cascade = CascadeType.ALL) private ArrayListAnnotationHasTag annotationHasTags; //setters and getters @Entity @Table(name = annotation_has_tag) public class AnnotationHasTag implements Serializable, IsSerializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key id; @Basic @ManyToOne private Annotation annotation; @Basic @ManyToOne private Tag tag; //setters and getters @Entity @Table(name = tag) public class Tag implements Serializable, IsSerializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key id; @Basic private String name; //setters and getters. Please Help me out, It's been 5 days now. I'm stuck. I'll try any kind of suggestions. Thank you in advance. Kido. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Strange behavior by App Engine Eclipse Plugin
Just to close the loop - this is the new version of the Google Plugin for Eclipse that uses OAuth to authenticate. The benefit is that now, your plugin can cache the OAuth tokens so that you don't ever have to re-enter your email/password to deploy. This is much more secure than caching your email and password. In addition, you can always revoke the tokens, so if you log in on someone else's computer and forget to log out, you can disable their ability to deploy without having to change your password. Ikai Lan Developer Programs Engineer, Google App Engine Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine On Tue, May 24, 2011 at 6:29 AM, Brandon Donnelson branflake2...@gmail.comwrote: In the Development Mode tab, when you see the link, right click on it, you'll get choices of which browser to run. You can set it back to default browser or choose another browser to run. Brandon Donnelson http;//gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Google App Engine + Java Applet
Hi, You can run Applets on App Engine - we are using an Applet / App engine on the App below: https://www.google.com/enterprise/marketplace/viewListing?productListingId=8343+8778914019165296828 https://www.google.com/enterprise/marketplace/viewListing?productListingId=8343+8778914019165296828 Cheers, Ian. On Mon, May 23, 2011 at 11:07 PM, SKP patil.sha...@gmail.com wrote: Hi I have been trying to do Encryption /Decryption (using javax.crypto) on browser side i.e. using javascript. Data is stored in GAE's datastore. I created a java applet that can encrypt/decrypt to use javax.crypto. But now i see that google app engine doesnt support java.applet.Applet . Is there any work around or anyway I can go about browser side encryption /decryption? Thanks Sharada -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Coding with Adobe Software
If you are brand-new to coding, I would not use GWT. I would start with HTML/CSS/Javascript. Many folks start their coding careers there (and many many stay there because they love it). You can get started quickly and the learning curve is not so steep. The learning curve on GWT or even Adobe Flash is very steep at the start. If you are doing a news app, html/css/javascript is probably very appropriate. Note that Javascript and GWT are designed for creating browser delivered UI's, but you can package them up using various technologies to create an application suitable for the app store and android market. I use Flash Builder and the Adobe Flex Framework for most of my client UI work and I love it. I decided to use it about 2 years ago, before GWT was really solid and HTML5 was viable (perhaps it's still not quite viable yet). The tooling is very good and the Flex framework is really outstanding. The Flex framework includes an xml based declarative UI system (mxml) which is really nice for building quick apps. You can graduate to ActionScript3 to do more significant logic. You can package your app for a browser or for iOS or Android devices (and Blackberry Playbook tablet). So, this would be a pretty good choice for your client UI as well. GWT is a truly great set of tooling and it gets better and better with each release. If I were to choose UI tooling for myself today, I would choose GWT because it provides great tooling and path to all the devices I want to target now and in the future. However, I have been doing software engineering for 25 years and I know Java well, so the learning curve is not so bad for me. I would not recommend GWT to someone just learning how to code. On the server side, GAE is a good choice - you don't have to worry about hardware and scaling. However, I would probably choose Python because the learning curve is less steep than Java. (PS: I use Java GAE it is is very good, my recommendation is based on your experience level, not the quality of Java GAE). There are lots of entry level resources for the Python language and the server side framework makes coding many scenarios easier than Java. On the server side, you might also look at CouchDB. This is a distributed database that is accessed via RESTful api's and extended using Javascript. This is a really, really fine solution that makes it easy to create a server that is primarily about saving and retrieving data. You can set this up on your own machine to see how it works. Some folks are combining this with another javascript server technology, called node.js, to create a complete server solution that is programmed in Javascript. You can probably find hosted versions of this combination, so you won't have to setup servers. So, more to your question, How do I code the application so that it functions with the interface?. I create what are referred to as Rich Client Applications (RIA). The client is basically a full application (not a set of pages, like a traditional website), that asks the server for data and then uses it to drive the client UI. When the client wants to save data, it sends it to the server and the server stores it in a database. In my case, the server is pretty simple (as servers go), in that is simply saves data that the client gives to it and gives it back when the client asks for it. I 'expose' the server as a set of RESTful api's that return the data as XML or JSON (note that CouchDB does this as well). I like this architecture because it clearly separates the client and server. By creating a RESTful server api that uses the HTTP standard, I can use ANY client technology to talk to it (javascript, GWT, Flex or ObjectiveC are all doable) Moreover, I can use any server technology to implement the RESTful server api. Basically, I give myself much more flexibility because the client and server technologies are decoupled, so as the world changes, I can change with it. Also, this lets me integrate with 3rd parties much more easily. I hope this helps. Good luck. Coding is the second most fun thing in the world. On May 19, 10:39 pm, Daniel Nieblas pearlharborpreva...@gmail.com wrote: Hi my name is Daniel, I'm new to coding, so everything literally feels like a foreign language at this point, but I decided to start learning because I'm interested in developing a news app for smartphones and tablets. Anyway i'm using the Java version of the GAE SDK and was wondering how exactly does coding incorporate commercial-based software. Im saving up to buy Adobe InDesign CS5.5 so that I can create the user interface for the app, but I'm not sure how exactly that works itself out in relation to coding the app itself. How do I code the application so that it functions with the interface? thanks for helping out:) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to
[appengine-java] RemoteApi : Null pointer Exception
Hi I have a nullPointerException when I try to insert data in my production site. It works with the local server. I have tried with the sample code of the documentation but the error is the same. I am using the version 1.5.0.1 of the java sdk Sample code public class RemoteApiExample { public static void main(String[] args) throws IOException { String username = System.console().readLine(username: ); String password = new String(System.console().readPassword(password: )); RemoteApiOptions options = new RemoteApiOptions() .server(your app.appspot.com, 443) .credentials(username, password); RemoteApiInstaller installer = new RemoteApiInstaller(); installer.install(options); try { DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); System.out.println(Key of new entity is + ds.put(new Entity(Hello Remote API!))); } finally { installer.uninstall(); } } } Exception in thread main java.lang.NullPointerException at com.google.appengine.tools.remoteapi.ClientLogin.getClientLoginToken(ClientLogin.java: 72) at com.google.appengine.tools.remoteapi.ClientLogin.login(ClientLogin.java: 36) at com.google.appengine.tools.remoteapi.RemoteApiInstaller.loginImpl(RemoteApiInstaller.java: 195) at com.google.appengine.tools.remoteapi.RemoteApiInstaller.login(RemoteApiInstaller.java: 165) at com.google.appengine.tools.remoteapi.RemoteApiInstaller.install(RemoteApiInstaller.java: 86) at unittest.com.website.tools.RemoteApiExample.main(RemoteApiExample.java: 18) Thanks PA -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: RemoteApi : Null pointer Exception
Sorry I have made a mistake in my email account. Evrything works fine PA On May 24, 11:32 pm, pavb pavieillardba...@gmail.com wrote: Hi I have a nullPointerException when I try to insert data in my production site. It works with the local server. I have tried with the sample code of the documentation but the error is the same. I am using the version 1.5.0.1 of the java sdk Sample code public class RemoteApiExample { public static void main(String[] args) throws IOException { String username = System.console().readLine(username: ); String password = new String(System.console().readPassword(password: )); RemoteApiOptions options = new RemoteApiOptions() .server(your app.appspot.com, 443) .credentials(username, password); RemoteApiInstaller installer = new RemoteApiInstaller(); installer.install(options); try { DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); System.out.println(Key of new entity is + ds.put(new Entity(Hello Remote API!))); } finally { installer.uninstall(); } } } Exception in thread main java.lang.NullPointerException at com.google.appengine.tools.remoteapi.ClientLogin.getClientLoginToken(ClientLogin.java: 72) at com.google.appengine.tools.remoteapi.ClientLogin.login(ClientLogin.java: 36) at com.google.appengine.tools.remoteapi.RemoteApiInstaller.loginImpl(RemoteApiInstaller.java: 195) at com.google.appengine.tools.remoteapi.RemoteApiInstaller.login(RemoteApiInstaller.java: 165) at com.google.appengine.tools.remoteapi.RemoteApiInstaller.install(RemoteApiInstaller.java: 86) at unittest.com.website.tools.RemoteApiExample.main(RemoteApiExample.java: 18) Thanks PA -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Strange behavior by App Engine Eclipse Plugin
Ikai that is what i thought, i realized i allowed some updates to happen by opening my firewall. now the question to you : 1how do i change the browser behavior (some reason my cookie setting (whatever i do) is not being liked. i tried to allow cookies in all browser. 2how do i go back to normal eclipse local deployment (with no oauth) -cp On May 24, 12:46 pm, Ikai Lan (Google) ika...@google.com wrote: Just to close the loop - this is the new version of the Google Plugin for Eclipse that uses OAuth to authenticate. The benefit is that now, your plugin can cache the OAuth tokens so that you don't ever have to re-enter your email/password to deploy. This is much more secure than caching your email and password. In addition, you can always revoke the tokens, so if you log in on someone else's computer and forget to log out, you can disable their ability to deploy without having to change your password. Ikai Lan Developer Programs Engineer, Google App Engine Blog:http://googleappengine.blogspot.com Twitter:http://twitter.com/app_engine Reddit:http://www.reddit.com/r/appengine On Tue, May 24, 2011 at 6:29 AM, Brandon Donnelson branflake2...@gmail.comwrote: In the Development Mode tab, when you see the link, right click on it, you'll get choices of which browser to run. You can set it back to default browser or choose another browser to run. Brandon Donnelson http;//gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Strange behavior by App Engine Eclipse Plugin
appcfg.sh behavior should not have changed. You can use the command line tool. Ikai Lan Developer Programs Engineer, Google App Engine Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine On Tue, May 24, 2011 at 2:44 PM, cp consultp...@gmail.com wrote: Ikai that is what i thought, i realized i allowed some updates to happen by opening my firewall. now the question to you : 1how do i change the browser behavior (some reason my cookie setting (whatever i do) is not being liked. i tried to allow cookies in all browser. 2how do i go back to normal eclipse local deployment (with no oauth) -cp On May 24, 12:46 pm, Ikai Lan (Google) ika...@google.com wrote: Just to close the loop - this is the new version of the Google Plugin for Eclipse that uses OAuth to authenticate. The benefit is that now, your plugin can cache the OAuth tokens so that you don't ever have to re-enter your email/password to deploy. This is much more secure than caching your email and password. In addition, you can always revoke the tokens, so if you log in on someone else's computer and forget to log out, you can disable their ability to deploy without having to change your password. Ikai Lan Developer Programs Engineer, Google App Engine Blog:http://googleappengine.blogspot.com Twitter:http://twitter.com/app_engine Reddit:http://www.reddit.com/r/appengine On Tue, May 24, 2011 at 6:29 AM, Brandon Donnelson branflake2...@gmail.comwrote: In the Development Mode tab, when you see the link, right click on it, you'll get choices of which browser to run. You can set it back to default browser or choose another browser to run. Brandon Donnelson http;//gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Coding with Adobe Software
InDesign is a page layout program for printing, more or less. You probably could use it to mock up your web pages but it's drastic overkill when you're new to coding. Do your mock ups with static html, as others have pointed out. If you're looking for an html editor, I'd use something like Notepad if you're on Windows; that may sound facetious but as a programmer you need to learn all the nitty gritty stuff. Realistically you could use Eclipse, but don't use any wysiwyg thing that it may have, for dragging and dropping things on the page; edit the raw html so that you learn what it's about. For starting out with java web programming, it wouldn't hurt to start with plain old jsp and servlets. That might seem a bit antediluvian to those of us using web frameworks like SpringMVC (ugh) or Stripes (yay!) but it would get you up to speed with the concepts of the Java Servlet Container and configuring things with web.xml, and whatnot. On 2011-05-19 22:39, Daniel Nieblas wrote: Hi my name is Daniel, I'm new to coding, so everything literally feels like a foreign language at this point, but I decided to start learning because I'm interested in developing a news app for smartphones and tablets. Anyway i'm using the Java version of the GAE SDK and was wondering how exactly does coding incorporate commercial-based software. Im saving up to buy Adobe InDesign CS5.5 so that I can create the user interface for the app, but I'm not sure how exactly that works itself out in relation to coding the app itself. How do I code the application so that it functions with the interface? thanks for helping out:) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: open source pdf engine for GAE
I didn't look at your snippets in detail, but instead used the group search feature to find a successful creation of a pdf on appengine by someone else. At the bottom of this conversation they say they got the opensource iText working on appengine: http://www.google.com/url?sa=Dq=http://groups.google.com/group/google-appengine-java/browse_thread/thread/7dfdf19cfdd410d6/ee7024dd040ba6eb%3Flnk%3Dgst%26q%3Dpdf%23ee7024dd040ba6eb Then details of using javamail are in the appengine javadocs: http://www.google.com/url?sa=Dq=http://code.google.com/appengine/docs/java/mail/usingjavamail.html On May 20, 10:42 am, Vik vik@gmail.com wrote: any further advise on this please? Thankx and Regards Vik Founderhttp://www.sakshum.orghttp://blog.sakshum.org On Wed, May 18, 2011 at 12:03 PM, Vik vik@gmail.com wrote: Hie Even below code fails for the same exception ByteArrayOutputStream out = new ByteArrayOutputStream(); PDF pdf; try { pdf = new PDF(out); log.info(#1); pdf.setTitle(Using TextColumn and Paragraph classes); pdf.setSubject(Examples); pdf.setAuthor(Innovatics Inc.); log.info(#2); Page page = new Page(pdf, Letter.PORTRAIT); pdf.flush(); Multipart mp = new MimeMultipart(); MimeBodyPart htmlPart = new MimeBodyPart(); htmlPart.setFileName(whatever.pdf); log.info(#7); htmlPart.setContent(out.toByteArray(), application/pdf); mp.addBodyPart(htmlPart); log.info(#8); Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); Message msg = new MimeMessage(session); msg.setContent(mp); msg.setFrom(new InternetAddress(vik@gmail.com)); msg.addRecipient(Message.RecipientType.TO, new InternetAddress(vik@gmail.com)); msg.setSubject(testing PDF system); Transport.send(msg); Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Wed, May 18, 2011 at 10:25 AM, Stephen Johnson onepagewo...@gmail.comwrote: Try not adding the image or the font. Just try to get as simple a PDF working as possible. On Tue, May 17, 2011 at 9:47 PM, Vik vik@gmail.com wrote: Hie I am doing exact same. Here is the code: log.info(start of PDFTest:); //OutputStream out = resp.getOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream(); PDF pdf; try { pdf = new PDF(out); log.info(#1); pdf.setTitle(Using TextColumn and Paragraph classes); pdf.setSubject(Examples); pdf.setAuthor(Innovatics Inc.); log.info(#2); String fileName = images/share_facebook.png; Image image1 = new Image(pdf, new BufferedInputStream( getClass().getResourceAsStream(fileName)), ImageType.PNG); log.info(#3); Font f1 = new Font(pdf, new BufferedInputStream(getClass().getResourceAsStream( fonts/DroidFonts/DroidSerif-Regular.otf)), CodePage.UNICODE, Embed.YES); Page page = new Page(pdf, Letter.PORTRAIT); f1.setSize(10); image1.setPosition(90, 35); image1.scaleBy(0.75); image1.drawOn(page); TextColumn column = new TextColumn(f1); column.setLineBetweenParagraphs(false); Paragraph p1 = new Paragraph(); p1.setAlignment(Align.CENTER); p1.add(new TextLine(f1, Switzerland)); Paragraph p2 = new Paragraph(); p2.add(new TextLine(f1, Introduction)); Paragraph p4 = new Paragraph(); p4.add(new TextLine(f1, Economy)); Paragraph p5 = new Paragraph(); p5.setAlignment(Align.JUSTIFY); text = new TextLine(f1); column.setSize(470, 100); Point point1 = new Point(90, 300); // TextColumn start point Point point2 = column.sizeOn(page); // TextColumn end point Line line = new Line( point1.getX(), point1.getY() + point2.getY(), point1.getX() + point2.getX(), point1.getY() + point2.getY()); line.drawOn(page); column.drawOn(page); pdf.flush(); Multipart mp = new MimeMultipart(); MimeBodyPart htmlPart = new MimeBodyPart(); htmlPart.setFileName(whatever.pdf); log.info(#7); htmlPart.setContent(out.toByteArray(), application/pdf); mp.addBodyPart(htmlPart); log.info(#8); Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null);