You likely don't need "ALL" of JDO JPA's functionality.

 

I have nothing against JDO/JPA if you don't need the whole thing strip out
what you don't need. That is hard with the frame work.

 

But. If you have a

 

deletePersistent

 

equivalent in your code, name it that.

If you have a JDO/JPA function that is (Object,thing=array,target=None) for
its use, and you have a very similar function in your make your code take
the same arguments with the same name.

 

This is just good practice for making sure your code is readable.

 

 

Let's say you want to do a store.

 

public void apply()
{
    Product newProduct = new Product();
    newProduct.setName(pname);
    newProduct.setPrice(Double.parseDouble(pprice));
    newProduct.setStock(Integer.parseInt(pstock));
 
    PersistenceManager manager = factory.getPersistenceManager();
 
    Transaction tx = null;
    tx = manager.currentTransaction();
    tx.begin();
 
    manager.makePersistent(newProduct);
 
    tx.commit();
 
    manager.close();
}

 

 

You can easily make your own class that includes makePersistent and Commit

makePersistent

        entity.setProperty(newProduct);

 

commit

        DatastoreService datastore = DatastoreServiceFactory

                .getDatastoreService();

        datastore.put(entity);

 

 

Bonus we could add to commit code so that it does a Datastore Put, AND
writes the data to memcache

 

Even if you don't replace the most complicated functions/classes you reduce
your lockin.

 

Conversely, when you are doing rapid development and proof of concept coding


 

You can start with classes that are your own that wrap the JDO/JPA, and once
you have the app working you can start stripping JDO out of those functions.

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Rerngvit Yanggratoke
Sent: Saturday, August 04, 2012 2:25 AM
To: [email protected]
Subject: Re: [google-appengine] Re: What are the pros and cons of using
Google App engine for my startup?

 

Hello Drake,

      That is possible but would increase your application size. Then, why
not use JDO or JPA instead? It is the same lines of reason.

On Sat, Aug 4, 2012 at 11:13 AM, Drake <[email protected]> wrote:

If you have lockin you are doing it wrong.

Wrap your Google Specific API calls so that they function like the Heavy
versions you can't/shouldn't use.

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Rerngvit Yanggratoke
Sent: Saturday, August 04, 2012 1:49 AM
To: [email protected]
Subject: Re: [google-appengine] Re: What are the pros and cons of using
Google App engine for my startup?

 

As many people have stated about advantages of GAE for startup already, let
me provide some disadvantages. The purpose of this is not to discourage
people to use GAE but inform them about both sides of the story.

 

The first and most important issue is a vendor lock-in. GAE normally
requires you to spend significant efforts to develop and optimize
specifically for the platform to run your applications nicely and cost
effectively. For example, it is recommended to use a platform-specific
database layer like Objectify than the portable but heavy-weight one like
JPA or JDO. Another example is that it is recommended to minimize the size
of your applications to reduce the cold-start time. This also means that
very useful but heavy-weight frameworks like Spring are not going to be
comfortable with GAE unless you are willing to pay a steep price of
"reserved instances". As a result, if one day you have to move your
applications away from GAE to somewhere else, porting your applications is
not going to be an easy task. You might have to spend significant resources
for that. The possible reason for the movement might be that Google
increases the price significantly such that your business model is not
sustainable anymore. This happened before to many people. Have a look in the
highly popular forum topic
(https://groups.google.com/forum/?fromgroups#!topic/google-appengine/obfGjbI
kOTI).  Now, some people might argue by bringing up Opensource alternative
of GAE like Typhoonae (http://code.google.com/p/typhoonae/) or
AppScale(http://code.google.com/p/appscale/). Despite the fact those are
great and honorable attempts, neither of them are fully compatible with GAE.
In other words, if your applications run smoothly on GAE, they might simply
break apart on their platforms. 

 

The second issue is the development efforts and learning curve required. GAE
is designed for highly scalable applications and require you as a programmer
to think the same. It certainly requires a new mindset compared to a
traditional web applications development. Generally speaking, everything you
do should be able to implement in a fully distributed way. For instance, you
should not use a relational database like Mysql because it is a major
bottleneck in traditional web applications. (You actually can use it now
with Google Cloud SQL. However, it deteriorates the purpose of running an
application for GAE). 

 

The third issue is a sharing of fate. This is actually not just for GAE but
for any other cloud solutions. You are going to run your applications on a
shared infrastructure. You do not know what applications are run besides you
in the same IP. They might be spam or malicious software developed by
hackers. Then, the IP might be blocked for a security reason. An example of
this is the recent CloudFlare blocking issue
(https://groups.google.com/forum/#!msg/google-appengine/Q6yQ4d9ov-o/hAyrgn0x
ZQwJ).

 

All in all, the major thing to concern is picking the right tool for the
right job. GAE is suitable if your applications require a very high
scalability and you don't have or want to operate an operation team (System
administrators). Other than that, I would recommend you to find other
options. 

 

On Sat, Aug 4, 2012 at 1:03 AM, hyperflame <[email protected]> wrote:

It would be a good fit for most of those subjects, but keep in mind
that GAE cannot access email through IMAP or POP3 because it doesn't
support sockets, only standard url fetch. If you want to include email
in your service, you'll have to base a proxy somewhere else, such as
Rackspace, Heroku/AWS, etc.


On Aug 3, 4:37 am, Levi Campbell <[email protected]> wrote:
> I'm building a startup, and I'm considering GAE as the platform, however
> I've been having a hard time finding information on why a startup might
> consider GAE instead of the many cloud providers out there. Let me explain
> what I'm working on.
>
> I'm a big fan of David Allen's Getting Things Done: The Art of Stress-Free

>
Productivity<http://www.amazon.com/Getting-Things-Done-Stress-Free-Productiv
ity/dp...>,

> and after trying several tools and online services that (claim to)
> implement the GTD methodology, I couldn't find anything that I loved, so I
> decided to build my own and make it available as a SaaS offering. This app
> will allow users to pull in their info_crap from email, facebook, twitter
> (and yes, I do have plans to add support for more social networks.), and
> RSS feeds and organize it by relationship to the sender (i.e. family,
> work colleague, vendor, and the like), project (i.e. planning a family
> vacation.), and context (Either the when or where something should
> happen.).\
>
> Would GAE be a good fit for the application I'm developing? Why?

--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.

To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]
<mailto:google-appengine%[email protected]> .
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.





 

-- 
Best Regards,
Rerngvit Yanggratoke 

-- 
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]
<mailto:google-appengine%[email protected]> .
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.





 

-- 
Best Regards,
Rerngvit Yanggratoke 

-- 
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to