Search Results

Search found 9 results on 1 pages for 'gerdemb'.

Page 1/1 | 1 

  • Why isn't Google Web Toolkit more popular?

    - by gerdemb
    I've recently become intrigued with Google Web Toolkit and have started playing with it on some personal projects. I've noticed though that it doesn't seem to be very popular. For example, two major freelancing job boards (www.elance.com and www.odesk.com) list no jobs for GWT and the list of projects using it on Google's official site is pretty slim http://code.google.com/webtoolkit/app_gallery.html (compare to Django projects for example http://www.djangosites.org/). This seems odd to me as GWT has been around since 2006 and is supported by the Google brand name. It also neatly solves the problem of creating cross-browser completely dynamic websites that I haven't seen possible with any other tool. So, why the lack of acceptance?

    Read the article

  • Problems with contenttypes when loading a fixture in Django

    - by gerdemb
    I am having trouble loading Django fixtures into my MySQL database because of contenttypes conflicts. First I tried dumping the data from only my app like this: ./manage.py dumpdata escola > fixture.json but I kept getting missing foreign key problems, because my app "escola" uses tables from other applications. I kept adding additional apps until I got to this: ./manage.py dumpdata contenttypes auth escola > fixture.json Now the problem is the following constraint violation when I try to load the data as a test fixture: IntegrityError: (1062, "Duplicate entry 'escola-t23aluno' for key 2") It seems the problem is that Django is trying to dynamically recreate contenttypes with different primary key values that conflict with the primary key values from the fixture. This appears to be the same as bug documented here: http://code.djangoproject.com/ticket/7052 The problem is that the recommended workaround is to dump the contenttypes app which I'm already doing!? What gives? If it makes any difference I do have some custom model permissions as documented here: http://docs.djangoproject.com/en/dev/ref/models/options/#permissions

    Read the article

  • Is a GWT app running on Google App Engine protected from CSRF

    - by gerdemb
    I'm developing a GWT app running on the Google App Engine and wondering if I need to worry about Cross-site request forgery or is that automatically taken care of for me? For every RPC request that requires authentication, I have the following code: public class BookServiceImpl extends RemoteServiceServlet implements BookService { public void deleteInventory(Key<Inventory> inventoryKey) throws NotLoggedInException, InvalidStateException, NotFoundException { DAO dao = new DAO(); // This will throw NotLoggedInException if user is not logged in User user = dao.getCurrentUser(); // Do deletion here } } public final class DAO extends DAOBase { public User getCurrentUser() throws NotLoggedInException { currentUser = UserServiceFactory.getUserService().getCurrentUser(); if(currentUser == null) { throw new NotLoggedInException(); } return currentUser; } I couldn't find any documentation on how the UserService checks authentication. Is it enough to rely on the code above or do I need to to more? I'm a beginner at this, but from what I understand to avoid CSRF attacks some of the strategies are: adding an authentication token in the request payload instead of just checking a cookie checking the HTTP Referer header I can see that I have cookies set from Google with what look like SID values, but I can't tell from the serialized Java objects in the payloads if tokens are being passed or not. I also don't know if the Referer header is being used or not. So, am I worrying about a non-issue? If not, what is the best strategy here? This is a common enough problem, that there must be standard solutions out there...

    Read the article

  • Security when using GWT RPC

    - by gerdemb
    I have an POJO in Google Web Toolkit like this that I can retrieve from the server. class Person implements Serializable { String name; Date creationDate; } When the client makes changes, I save it back to the server using the GWT RemoteServiceServlet like this: rpcService.saveObject(myPerson,...) The problem is that the user shouldn't be able to change the creationDate. Since the RPC method is really just a HTTP POST to the server, it would be possible to modify the creationDate by changing the POST request. A simple solution would be to create a series of RPC functions like changeName(String newName), etc., but with a class with many fields would require many methods for each field, and would be inefficient to change many fields at once. I like the simplicity of having a single POJO that I can use on both the server and GWT client, but need a way to do it securely. Any ideas?

    Read the article

  • Debugging a Google Web Toolkit application that has an error when deployed on Google App Engine

    - by gerdemb
    I have a Google Web Toolkit application that I am deploying to Google App Engine. In the deployed application, I am getting a JavaScript error Uncaught TypeError: Cannot read property 'f' of null. This sounds like the JavaScript equivalent of a Java NullPointerException. The problem is that the GWT JavaScript is obfuscated, so it's impossible to debug in the browser and I can't reproduce the same problem in hosted mode where I could use the Java debugger. I think the reason I'm only seeing the error on the deployed application is that the database I'm using on the GAE server is triggering something differently than the test database I'm using during testing and development. So, any ideas about the best way to proceed? I've thought of the following things: Deploy a non-obsfucated version of my application. Despite a lot of Googling, I can't figure out how to do this using the automatic deploy script provided with the Google Eclipse Plugin. Does anyone know? Download and copy my GAE data to the local server Somehow point my development code to use the GAE server for data instead of the local test database. This seems like the best idea... Can anyone suggest how to proceed here? Finally, is there a way to catch these JavaScript errors on the production server and log them somewhere? Without logging, I won't have anyway to know if my users are having errors that don't occur on the server. The GWT.log() function is automatically stripped out of the production code...

    Read the article

  • Help a CRUD programmer think about an "approval workflow"

    - by gerdemb
    I've been working on a web application that is basically a CRUD application (Create, Read, Update, Delete). Recently, I've started working on what I'm calling an "approval workflow". Basically, a request is generated for a material and then sent for approval to a manager. Depending on what is requested, different people need to approve the request or perhaps send it back to the requester for modification. The approvers need to keep track of what to approve what has been approved and the requesters need to see the status of their requests. As a "CRUD" developer, I'm having a hard-time wrapping my head around how to design this. What database tables should I have? How do I keep track of the state of the request? How should I notify users of actions that have happened to their requests? Is their a design pattern that could help me with this? Should I be drawing state-machines in my code? I think this is a generic programing question, but if it makes any difference I'm using Django with MySQL.

    Read the article

  • Java equivalent for database schema changes like South for Django?

    - by gerdemb
    I've been working on a Django project using South to track and manage database schema changes. I'm starting a new Java project using Google Web Toolkit and wonder if there is an equivalent tool. For those who don't know, here's what South does: Automatically recognize changes to my Python database models (add/delete columns, tables etc.) Automatically create SQL statements to apply those changes to my database Track the applied schema migrations and apply them in order Allow data migrations using Python code. For example, splitting a name field into a first-name and last-name field using the Python split() function I haven't decided on my Java ORM yet, but Hibernate looks like the most popular. For me, the ability to easily make database schema changes will be an important factor.

    Read the article

  • Accessing the "super of this" in Java

    - by gerdemb
    This is what I'm doing now. Is there a better way to access the super class? public class SearchWidget { private void addWishlistButton() { final SearchWidget thisWidget = this; button.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { // A better way to access the super class? // something like "this.super" ...? workWithWidget(thisWidget); } } } } I'm programming with Google Web Toolkit, but I think this is really a generic Java question.

    Read the article

  • Clean way in GWT/Java to wait for multiple asynchronous events to finish

    - by gerdemb
    What is the best way to wait for multiple asynchronous callback functions to finish in Java before continuing. Specifically I'm using GWT with AsyncCallback, but I think this is a generic problem. Here's what I have now, but surely there is cleaner way... AjaxLoader.loadApi("books", "0", new Runnable(){ public void run() { bookAPIAvailable = true; ready(); }}, null); AjaxLoader.loadApi("search", "1", new Runnable(){ public void run() { searchAPIAvailable = true; ready(); }}, null); loginService.login(GWT.getHostPageBaseURL(), new AsyncCallback<LoginInfo>() { public void onSuccess(LoginInfo result) { appLoaded = true; ready(); } }); private void ready() { if(bookAPIAvailable && searchAPIAvailable && appLoaded) { // Everything loaded } }

    Read the article

1