[appengine-java] Re: Coding with Adobe Software

2011-05-26 Thread emurmur
Yes, the w3schools material is good.  The mozilla foundation also had
a great set of learning materials at http://developer.mozilla.org
Click on the learning tab in the upper right.

Ed

On May 25, 4:00 am, Drew Spencer slugmand...@gmail.com wrote:
 Sorry dude, I kinda naively assumed you would already have some experience
 in HTML/CSS. As the two above have said, these are the foundations of all
 web pages.

 I highly recommend the tutorials on w3schools.com for both of them. They
 give a great introduction to becoming a web designer:

    -http://www.w3schools.com/html/default.aspfirst of all, and then
    -http://www.w3schools.com/css/default.asp

 They have a great feature that lets you try things as you go along, but
 notepad is the way to go also. Try making your own basic web page - practice
 adn experimentation are the only way you really get things to stick in your
 head.

 One last link for you:http://www.w3.org/Style/Examples/011/firstcss

 Have fun!

 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

2011-05-24 Thread emurmur
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] NoSuchMethodError totalMemory()

2011-05-03 Thread emurmur
My app started throwing exceptions right after the latest maintenance; 
 apparently Runtime.getRuntime().totalMemory() is now actually removed from 
the server runtime?  Couldn't you just return zero?

java.lang.NoSuchMethodError: 
com.google.apphosting.runtime.security.shared.intercept.java.lang.Runtime_.totalMemory(Ljava/lang/Runtime;)J
at 
com.conceptualcalculations.util.MemoryUtils.formatMemoryLog(MemoryUtils.java:23)

-- 
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: JPA/JDO vs low level API

2011-04-03 Thread emurmur
I've been using Java AppEngine since it became available.   I chose
JDO for portability and so I could get started very quickly.  I can
say that JDO offers very little real portability for significant apps
because of the very different semantics of the underlying datastore.
If I were developing for an SQL datastore, my datamodel would be
pretty different.  For instance, it is easy in most SQL datastores to
use one or more fields as a unique, mutable secondary key (like an
email address or Social Security Number).  In the appengine datastore,
if you have the datastore generate unique primary keys, but you want
to enforce a unique mutable secondary key, you need to use a separate
entity to serve as the secondary key mutex.  This is a fine solution
if you are using the low level API, because you can have your data
access layer create and check this mutex so this does not bubble up to
your application code.  However, with JDO, you have to create another
pojo and manage it so it can serve as the mutex.  Ick.

When I chose JDO, no wrapper for the low level existed and
documentation of the low level was not great.  JDO was well documented
so I could get going fast.  However, there are now several good
alternative frameworks for using the low level datastore.  If I were
to start today, I would choose one of them and avoid JDO.  Now that I
know what I know, I will probably write my own low level wrapper so I
have more flexibility and control.


On Apr 2, 8:46 am, Jeff Schnitzer j...@infohazard.org wrote:
 An incomplete list of things that are difficult or impossible with
 JDO/JPA, but easy with Objectify/LowLevelAPI:

  * Partial indexes
  * Running multiple concurrent transactions, or (more likely) a
 transaction + a nontransaction.  Because of GAE's transaction model,
 this is actually necessary quite often.
  * Migrating your schema.  JDO/JPA is particularly brittle, you can't
 even add primitive fields to a class.
  * Serializing your entities.  With JDO you must detach them
 explicitly, with JPA (as implemented by DataNucleus) you simply can't.

 In practice, the biggest difference after abandoning JDO/JPA is that
 you will stop screaming loudly at your computer, annoying your
 coworkers.

 Jeff
 (copied from the response to the same question on the objectify mailing list)







 On Fri, Apr 1, 2011 at 4:50 AM, SkYlEsS shou...@gmail.com wrote:
  I have a question :

  What are the differences between JPA/JDO and low level API (and
  Objectify) in practice ? I read everywhere the low level API provides
  more flexibility, but there are never samples code or evidences to
  demonstrate it. So I'm wondering in which cases exactly, the low level
  API is useful ?

  Thanks in advance

  --
  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 
  athttp://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] Datastore not responding intermittently

2011-03-17 Thread emurmur
We are testing a update to our app on a couple of qa instances 
(applications, not just JVMs) of AppEngine.  Both are getting 
DeadlineExceededException pretty often.  However, we have only a single user 
hitting the database and it has little data in it - basically, there is no 
contention for the database, but sometimes it simply does not respond. 
 Below is an example log.  You can see that we use JDO to emit a query for a 
single entity.  However, the datastore never responds.  We have the same 
exact code running on two different AppEngine applications.  One of them has 
instant-on enabled (so it has 3 instances running all the time) and the 
other does not (so it needs to spin up an instance relatively regularly). 
 We are using JDO and Restlet, but not Spring or Grooving or other packages 
that take a very long time to initialize (initializing a new instance takes 
our app about 7 seconds).  The very similar code on our live application 
seems to be fine - we are not seeing the same thing.  This makes me worry 
about deploying to live.  Is anyone else seeing this kind of behavior with 
the datastore?

Caused by: com.google.apphosting.api.DeadlineExceededException: This request 
(d5cf2cc1a60c6af7) started at 2011/03/17 22:49:48.468 UTC and was still 
executing at 2011/03/17 22:50:17.887 UTC.
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at com.google.apphosting.runtime.AsyncFuture.get(AsyncFuture.java:54)
at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:67)
at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:67)
at 
com.google.appengine.api.datastore.FutureHelper.getInternal(FutureHelper.java:71)
at 
com.google.appengine.api.datastore.FutureHelper.quietGet(FutureHelper.java:32)
at 
com.google.appengine.api.datastore.QueryResultsSourceImpl.loadMoreEntities(QueryResultsSourceImpl.java:69)
at 
com.google.appengine.api.datastore.QueryResultsSourceImpl.loadMoreEntities(QueryResultsSourceImpl.java:56)
at 
com.google.appengine.api.datastore.QueryResultIteratorImpl.ensureLoaded(QueryResultIteratorImpl.java:156)
at 
com.google.appengine.api.datastore.QueryResultIteratorImpl.hasNext(QueryResultIteratorImpl.java:65)
at 
org.datanucleus.store.appengine.query.RuntimeExceptionWrappingIterator.hasNext(RuntimeExceptionWrappingIterator.java:44)
at 
org.datanucleus.store.appengine.query.LazyResult.resolveAll(LazyResult.java:115)
at 
org.datanucleus.store.appengine.query.LazyResult.size(LazyResult.java:110)
at 
org.datanucleus.store.appengine.query.StreamingQueryResult.size(StreamingQueryResult.java:124)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1508)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:1371)
at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:266)
at 
com.conceptualcalculations.model.Group.GroupMembershipDAO.testSecondaryKey(GroupMembershipDAO.java:185)
at 
com.conceptualcalculations.model.Group.GroupMembershipDAO.testSecondaryKey(GroupMembershipDAO.java:1)
at 
com.conceptualcalculations.persistence.JDOTemplate.innerGetBySecondaryKey(JDOTemplate.java:403)

-- 
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] how to keep fields unique

2011-03-07 Thread emurmur
It turns out the technique I described in my previous post has two issues.

1. Because only one transaction can be running at a time within a process, 
and the entity used as the mutex really cannot be in the same entity group 
as the primary entity, you can get into a situation where the mutex entity 
is orphaned if one transaction succeeds and the following transaction fails. 
 The orphaned mutex entity then prevents anyone for using it's version of 
the unique fields.

2. This solution, when used with JDO or JPA, is very verbose and obfuscates 
the primary intent of the code.  Also, you would never to do this with an 
SQL datastore, so it limits the portability of the code, which is why one 
would choose JDO/JPA in the first place.

Really, we want the uniqueness annotations to be implemented.

There is an issue in the bugbase for this, issue 178.  Folks have been 
talking about this for a long time.  Please star this issue if it is 
important to you.

http://code.google.com/p/googleappengine/issues/detail?id=178


-- 
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] Can I enqueue a task from within another Task handler?

2010-11-01 Thread emurmur
My code attempts to enqueue a new task within a transaction that
happens inside a task handler. Basically, I'm trying to enforce strict
serial handling by the tasks, so I have my task, as the last thing it
does, enqueue another task to the same url (but with a different name,
because I let appengine generate a random name).

When I first enqueue the task, it is from within a Post that is
generated from a client application. This first task execution works
correctly (it processes a bunch of work successfully), but then an
exception is thrown when it tries to enqueue another task to continue
the work. Am I simply doing something that is not allowed? I've looked
through the docs, but I don't see anything conclusive.

Thanks for your help.

-- 
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-j...@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] Ancestor queries on explicitly created entity groups in JDO?

2010-07-23 Thread emurmur
In my application I'm using JDO.  In some cases, I have un-owned
relationships where I explicitly created my own entity group because I
need to be able to do transactions with a group of records.  For
instance;

@PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable = true)
public class Customer
{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long customerId = null;

...

}

@PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable = true)
public class User
{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key userId = null;

@Persistent(defaultFetchGroup=true)
private Long customerId = null; // foreign-key for Customer

...
}

When I persist a User, I set the parent part of the userId key, then
let JDO fill in the id portion when I call save().  This all works
well.  However, sometimes I want to query a set of User's by the
Customer's id.  As you can see above, I've duplicated the customerId
in the User record for this purpose.  This works fine, but it takes an
extra field and creates an extra index.  What I'd really like to do is
to query the  User key's parent part so I can save an index, which
could add up over time.  I already have records in a production
database that have the above structure, so anything I do needs to be
backward compatible.  Everything I see in the docs assumes that you
are using JDO to maintain owned relationships, but I'm not doing
that.  I've tried using the 'parent-pk' field Datanucleus extension in
a query where I create a full Customer Key from the customerId field,
but I get an exception.  I believe this is because this 'virtual'
field is created by JDO only for owned relationships (but that is just
a guess).  Is there an explicit way within JDO to do an ancestor query
using the parent key if you are using unowned relationships?

-- 
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-j...@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] Turning on GWT in the project causes class not found excepction in my appengine code.

2010-07-07 Thread emurmur
I have an Java App Engine project using SDK 1.3.5 and the latest
Restlet GAE 2.0rc4 to implement some restful services.  Everything
worked well (this has been in product for 6 months) until I added GWT
to the project.  As soon as I check GWT on in the control panel
(without even adding a module) my services start to fail in the
development server with the following class not found exception:

Couldn't write the XML representation: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found

Any clues why simply turning GWT on would cause this?  Any solutions
that you know of?  Thanks much.

-- 
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-j...@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.