Re: could not add gin the project
And the JAR file has to be in war/WEB-INF/lib in the project, not an external include --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How do you deal with Validation and MVP?
This is a hot topic for me at the moment and I'll come back to you directly probably at the end of this coming week. Here's my interim thoughts though. I've been working on MVP over the last two weeks and don't think the various patterns I know of (including (Ray Ryan's, Fowler, Greer, and others) work very well for testing. I'm now using a variation I've called MVP-Ci for the moment which is a cross between MVP and Presentation Manager (see Fowler's web site). Validation is defined in the PM, for the moment using JSR303 annotations (but I suspect this will evolve). The framework I'm building (re-)evaluates the validity of fields as they are updated and stores them as attributes of the fields. The View observes the PM and can then update the screen accordingly as it wishes (i.e. any of the three ways you've described). How they are shown to the user is a matter of HCI. I don't know what the research says but I know what I like. Left to me I think that the Eclipse Java editor has got it right: small but apparent indicators with longer descriptive messages easily available. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: What validation framework best fits with Google-gin
There's examples for both on their websites. The 'advantage' with gwt- validation is that you use annotations although ironically I think I will end up not up not using them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: What validation framework best fits with Google-gin
The only one I've found is gwt-validation. It works pretty well but it has a few quirks particularly in letting exceptions disappear. The project isn't very active. Always make sure you have a public getter for the field you're validating. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: save form data in database
http://code.google.com/webtoolkit/tutorials/1.6/appengine.html I would walk through all of the tutorials on that page --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Cool GWT Features
Apart from Bruce Johnson's list, the killer selection criteria for me is Google App Engine. Outside GWT yes but it was the deciding factor for me. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Multi-Module or Multi-EntryPoint
Of course there are many ways of skinning this particular cat. Here is one... * Treat entry points as components on a web page. An EP might just be a menu or it could be the entire page. Prefer the latter if you're starting from scratch * I like to keep all the logic in one place - the one place in this instance is Java. I find it easier to maintain the app when all my layout logic is done in one language. Exception: styles. Define all styles in CSS file(s). Have a plan for defining style names and do that, and only that, in Java * Use a single index.html with a basic layout that is reused for the whole of the application. It may be that you want two or three major layouts - e.g you might want a catastrophic error message page. Keep these to a minimum for the user's sake * Figure out the major contexts of your application: user not signed in, edit preferences, create order, browse catalogue, ... I call these 'contexts', others call them 'places' * Put a working area in your main layout - this is where your contexts will be presented one at a time * Manage your contexts using the GWT History component * Use Composites to encapsulate, simplify and clarify complexity --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT 1.6 Architecture
See Ray Ryan's presentation: http://www.youtube.com/watch?v=PDuhR18-EdM and http://dl.google.com/io/2009/pres/Th_0200_GoogleWebToolkitArchitecture-BestPracticesForArchitectingYourGWTApp.pdf for a good starting point --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Command Pattern, MVP, EventBus
On Jul 23, 3:11 pm, Eduardo Nunes wrote: > Shouldn't the server errors be treated as unchecked exceptions > (extends RuntimeException)? Maybe a solution could be three methods, I've found my self coding RE's for just about everything now. I think they are the most undervalued part of the Java language during the development phase. Example try { final File f = new File("Whatever); ...do something with file } catch(final IOException e) { throw new RuntimeException("Something went wrong with the file operation", e); } The big advantages are you don't have to think about dealing with problems whilst you're writing your 'happy day' code, you avoid declaring exceptions which just put's off the inevitable and normally shifts the problem into a place where you're not equipped to deal with it and lastly: often times, especially in a stateless environment, a RE is the right course of action. It also travels from server to client in GAE/GWT which is good. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Command Pattern, MVP, EventBus
> Are your responses also in the form of events, where the traditional > response value is the "payload" of a new event object? For either server > error or validation error, are you sending back a different event, or > setting a flag inside the expected return event? Yes currently all inter-component communications is via events on the client side - the payload doesn't look like events on the server. I did try it but dropped the idea of a server side event bus. Events are not reused so different events come back from the server. It's experimental - it works but I don't have enough experience yet to claim it's a good or better idea. I use 'modelettes' for want of a better word which are litle bits of the core application model that travel twixt server and client. With response time latency and keeping bandwidth at reasonable levels in mind I want to keep what goes to the server in chunks (not like Google Wave that can do character by character). What I think will be the next big thing is a focus on services - encapsulation revisited but for different reasons. This has led me to having 'service providers' on the server as a layer above, and providing core business logic for, the core model objects: Person, Account, ... The service providers have a "response = process(request)" interface. When the SPs are loaded they announce which requests they would like to process to the server end of the pipe which will call them when the requests come in. > Unless you grew your event bus's intelligence, you would also lose > batching. Even undo could be tricky. I'm guessing inside your event bus > you have something like > if eventX.isRPCEvent() { > service.takethisEvent(eventx,new callback{...onsuccess(Event > resultEvent){ fireEvent(resultEvent)} > > }; > } Your're right. I'll try and think of a way of addressing this. It may be that I have to step back and find a place for commands a bit. > Do you have a separate, server side event bus to do things... See above > ...Also do you ever have one > event that goes to the server, but two events coming back?... Not yet. I've built in a mechanism for SPs to passively listen to completed processing of requests which could be used to piggy back events but I haven't used it yet (YAGNI?). >> * I dropped the idea of using HasClickHanders, HasValues, ... in favor > I also didn't like those two particular return types since my 3rd party > widgets (Smartgwt) don't support those interfaces. And wrapping each 3rd I'm reviewing this at the moment in the light of Thomas B's merciless but very correct post above. >> I still need to figure out a position on places / history (see posts >What pattern would you say you are using now? I am using History and think it's great. I don't have a clear, describable pattern yet > Along with someone else in a previous email, I also did not understand the > reason behind void startProcessing(); and void stopProcessing(); Not sure --- I'm going to try and post the code to the group next week so you can look for yourself --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Command Pattern, MVP, EventBus
See above positing ... 2/ Define Viewer interface (without thinking about how the Viewer might be implemented) ... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Command Pattern, MVP, EventBus
I think Jason has hit the nail on the head. The reason I got uncomfortable with the HasXxx's is that they expose the internal workings of the Viewer (Display in RR's terms). The name getSelectionButton() is a clue. The presenter doesn't and shouldn't care about how the Viewer decides how to trip an action - it might be by some convoluted means like a time out and then HasClickHandler makes no sense. The other thing that made me uncomfortable was where Display was defined - in the Viewer implementation. As soon as I did a second implementation: a mock object, I can see that something is going wrong. As a programmer I find myself being too focused on the internal view when I should be looking at how consumers of an interface see it. Guice for example sees it's core entities as injectors but I see them as factories. As the consumer, the Presenter is the boss here and, for example, a sign in Viewer only needs (g/s)etAccountName(), getPassword () and a 'signIn' callback. The HasXxxx expose a whole lot of other functionality that you don't want anybody using. In summary 1/ Define your Presenter logic 2/ Define your Viewer interface 3/ Unit test your Presenter implementation 4/ Implement and test your Viewer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Command Pattern, MVP, EventBus
A short update on the original posting. I've now implemented the pattern I suggested in the original post in a reference application and it's running. My goals for doing the work were to address two issues: 1/ My GWT/GAE productivity: after a short learning curve it had sped up but it slowed right down again 2/ I found it easier not to write unit tests (a dangerous state of affairs) - they made the project messy, infiltrated the code, were difficult to write and slow to run The current implementation: * Adds a generic RPC mechanism (the pipe) * Doesn't use the command pattern. Instead everything is an event. Selected events from the event bus are sent over the pipe and responses are fired back. This makes the pipe invisible - no more coding service interfaces * I've added a layer (Stratus) on top of Bigtable-JDO inspired by Grails create, find, update, delete * Added a NullPipe and mock implementation of Stratus - I can now run end-to-end testing: presenters to database - i.e. everything but the composite itself without deploying to GAE. 7 unit test files run in around 0.5 seconds and developing is fun again! Findings so far * Ray's presentation was really helpful * Commands as events (aka asychronicity on steroids!): I'm kinda OK with this. I'm aware of David's posting above so I'm not 100% sure although still positive about my implementation. You do loose the procedural feel of the service call and AsyncCallback return although it is really asynchronous. I expected it to be difficult to test but it's not. I need more experience with it * I moved the definition of the Viewer (RR's Display interface) to the Presentation interface. Sorry Ray, it was in the wrong place * I dropped the idea of using HasClickHanders, HasValues, ... in favor of methods like getPassword(), and addSignInClickHandler() in the Viewer interface. I think it's a very elegant idea but it doesn't sit well with EasyMock and I prefer tested code to elegant code and don't think I loose much * MVP is great, really easy to test and so, to develop I still need to figure out a position on places / history (see posts above). My real application makes heavy use of History and I like it a lot. But I still don't have a comfortable pattern that joins the viewers and history together yet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Client source, what's included, what's not
How does the compiler/deployer know what source code is to be xcompiled into JS for and shipped to the browser and what not in Ecipse? More specifically I would like src/com..myproj.clientto be included but... srctest/com..myproj.client not. Is there a way of doing that? Not a big problem if not but it keeps my project structure clean if there is a way. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Determine implemented interfaces
And Class.isAssignableFrom. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Command Pattern, MVP, EventBus
On Jul 15, 9:36 pm, David Peterson wrote: - Thinking further, I think it's better to separate the EventBus from - the Command system somewhat. The reason being that generally, events - are used to update on changes that have already happened, or are about - to happen. They don't trigger the actual event itself. Yes I've been thinking about that. Any user action that interacts with the server: sign in, create account, update address, etc., has an asynchronous response. I find myself tempted to wrap the service request in and make it synchronous but that would be morally wrong and lead into all kinds of difficulties in the details. So I've gone the other route... My proof of concept implementation treats a click on the 'sign in' button as an event which it fires and forgets to the event bug. Maybe this goes too far in the other direction - time will tell. I'll post my results as soon as I've got some real experience with it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Announcing GWTUpload
Great stuff - I'll be using that very soon. Any chance of a cancel button to cancel an ongoing upload? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to create my own Event for Composite Widgets ?
java.util is out, HandlerManager and Handlers are in See: http://code.google.com/webtoolkit/tutorials/1.6/manageevents.html It's a change for the better --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT architecture MVP/EventBus (mentioned at Google I/O)
I'm following your work with interest Eduardo, I'm in the process of building a 'dream-team reference application' myself including RPC, EasyMock, GIN, Guice, ... so I can unit test and hack end-to-end without deploying on a server. Here's question / comment... I don't understand the go() method on the presenter impl classes. Take for example mainPresenter.go(): it does a bit of widget composition adding the menu and returns the view which is the job of getView(). Then in go() you call menuPresenter.showMenu() which doesn't actually show the menu but instead it returns the view which is again the job of MenuPresenterImpl.getView(). My guess is you are (like me) having some problems in the last metre of the 100m just glueing the application together. I don't have a nice answer for that yet... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Command Pattern, MVP, EventBus
Just throwing up an idea here to see how many bullet holes it comes down with. I'm playing around with the command pattern which is a hot topic at the moment and wondered why it shouldn't be merged with the EventBus? The command pattern proposed by RR has to add a response object - the original doesn't (I don't have a GoF copy to hand), using and event bus would remove the requirement for it. Using the example presented by RR. 1/ User clicks on 'save' to save the edited phone number 2/ Presenter creates an RpcCommandEvent{, } and fires it to the eventBus 3/ RpcPipe, listening for RpcCommandEvent events, ships them off the to the server --- Server side --- 4/ RpcPipeService receives the event and invokes a specialized handler 5/ The handler verifies (for the sake of the example but I would normally do this client side) the new phone number, finds it OK and updates the storage 6/ Handler returns new phone number for contact ID x 7/ RpcPipeService ships (returns) the response on across the pipe --- Back on the client side --- 8/ RpcPipe fires the RPC return value as an event on the bus 9/ Listeners to ContactInfoUpdated events update the phone number I, in my ignorance, find the above a net gain * +ve: One pipe fits all, no need to update the mechanics of the RPC * +ve, -ve: The event designer has to know that the event should be shipped over the pipe * +ve: The statefulness of the RPC mechanism (every request has a response) fades away * +ve: In fact the Pipe itself could disappear with a bus on the server (see below) - end to end unit testing In my event driven fever I would also like to have an event bus on the server so that the handlers could register themselves for events but I not worried too much about that yet. OK fire away! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT Best Practices doubt
Fair enough - ironically I just ran into the collision here. The other Command is a command pattern too. I would still prefer RpcCommand or the like but 'nuff said. > Er... com.google.gwt.user.client.Command, used with MenuItem and > DeferredCommand (which many apps make use of). > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: New user with some simple quastions on using GWT with eclipse
Yes that's it. The engine starts up a hosting environment built on Jetty and you run/debug it there. I guess the socket error you're getting is caused by you relaunching the application and it's trying to use port 8080 again but it's already taken The Java gets cross-compiled when you deploy it to a server. Look at the Google App Engine for that - it's a fantastic service. The time-to-debug cycle does present a small hurdle especially as the application gets larger and it takes time to navigate to the place you want to debug / fix. You need to start looking at Guice/GIN, EasyMock and JUnits as an alternative. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT Best Practices doubt
Just my .02: Call it what it is and use the term Command rather than Action - it's an implementation of the Command Pattern. I know Ray said it was used elsewhere but that's in his app but not elsewhere --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: client statefull server stateless
I'm interested in Dean's comments on performance impact of session data which seems counter intuitive to me (not that I doubt you at all Dean, just want to understand!) 1/ The session is going to be stored anyway right. That's part of the contract with the client. I don't know what this equates to in terms of bytes but I guess it's not less than a 100. 2/ ytrewqsm's original problem would be solved by storing one single long in the session: the user ID. The session is 'secure enough' for many applications (banking, etc., excepted). Each service request made by the client in the context of that session can be authenticated 3/ We can't, and don't need to avoid being platform specific - we are talking GAE not WebSphere, WebLogic, JBoss, ... My guess is that the session will be stored somewhere in BigTable and will be scalable. 4/ For all other state needs - throw them at the client. There's a bunch of memory and CPU power out there that's free for the application - use it but keep an eye on client performance The alternative has a large impact on the design of the client raising the entry barrier significantly and I don't think that's in line with GAE's endgame. > serialization and server sync cross-talk in J2EE clusters. Even tho > the data kept is like 128 bytes ( which would seem harmless ), it > still leads to significant I/O for a LARGE number of users. Terracotta --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Do I have to use foreach or for-index-loop ?
Just a small note, I'd keep the final and add one on the Foo too. Less bugs and in-code documentation. I wrote an article somewhere called "Use finals everywhere" - I think it's a shame that final isn't the default in Java and instead you had to write, for example, var int i; final int length = list.size(); for(int i = 0; i < length; i++) { final Foo foo = list.get(i); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: client statefull server stateless
I think ytrewqsm has a point. If user X has authenticated, the server can know which user it is (stateful) and refuse to change (for example) another user's profile in response to a "Change user Y's password to xyz" request. If the server is stateless and the logged in user state is held on the client (recommended) then the server will innocently go ahead and process the a spoofed change password request (and any other spoofed request). I think that is what ytrewqsm is getting at --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Serialization
Not sure but can't this be can't it be done using Serializable (or IsSerializable - I don't understand what the difference is) rather than introducing a Transferable interface so you don't get an increase in code size? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT - Main Servlets?
It's up to you. You can have as many servlets as you like - one acting as a switch or several handling different aspects of your application. In the project I'm working on now I have a JSON 'report' server for visualizations, an authentication servlet and a couple of others taking care of the main business of the application. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Best pattern for client/server communication?
I don't have a boilerplate pattern available as I'm still experimenting myself. There seems to be two schools of thought: 1/ Try and reuse classes on both server and client sides which means exporting server logic to clients and vice versa 2/ Separating client and server logic and evolving the two separately At first I tried to do the former but I didn't like it: it's just not clean IMHO. What I'm trying to do now is focus on the service interface offered by the server to the client. Using Google App Engine helps this discipline. I define the service interface in terms of actions: 'Create new user', 'Transfer X from account x to account y', 'Get Employee details'. I'm at the frustrating phase that there's a lot of similar objects on both sides of the fence. But, over time, I'm seeing these diverge and evolve differently solving their own use cases without the restraint of trying to maintain a one-size-fits-all approach. In many of my core server-side and persistent objects: Employee, Account, etc., I have/had a method: EmployeeVo Employee.toVo(): i.e. to value object (as opposed to toString()). But, as my use cases become more refined I find that things evolve to having a Person object with toUserVo(), toEmployee() and toCustomerVo() methods that create client side objects that are shipped out to log in, update employee details or have a customer select a shipping address. I love these types of problems - that's what makes programming so much fun. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: unable to find xml file
I would really consider running through the Google getting started tutorials. They are well structured and pretty complete in that they also introduce you to the server side and App Spot which is frankly a brilliant service. Here's the three most used links I used whilst getting up to speed. http://code.google.com/webtoolkit/gettingstarted.html http://gwt.google.com/samples/Showcase/Showcase.html http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/index.html?overview-summary.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Bug? Serialization of inner classes
Great answer (you got 5 stars for that). The reason that I want it for an inner class of course is so I have access to the containing class. I've got a work around in place so I guess I'll have to stick with that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Bug? Serialization of inner classes
Still no good, the lines of code below fail with an error message telling me that DataModel.InnerClass' was not serializable and has no concrete serializable subtypes public class DataModel implements Serializable, Iterable { public class InnerClass implements Serializable { private static final long serialVersionUID = -1674468523162022397L; public int i; public InnerClass() { } public int getI() { return i; } public void setI(int i) { this.i = i; } } public InnerClass ic; public InnerClass getIc() { return ic; } public void setIc(InnerClass ic) { this.ic = ic; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Bug? Serialization of inner classes
Not since 1.5. Private ctors should be fine as I understand it. I tried it and got the same error messages --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Bug? Serialization of inner classes
In the following code snippet the inner classes Row and Cell do not run through serialization. When it gets to "Verifying instantiability" an exception is thrown, see below. Everything does work if I take the inner classes out and make them first class citizens Code... public class DataModel implements Serializable, Iterable { private static final long serialVersionUID = 5660038413002738627L; public class Row implements Iterable, Serializable { private static final long serialVersionUID = -8434488660727968577L; public List cells; Row() { // } public Cell get(int index) { Cell result = cells.get(index); if(result == null) { result = new Cell(); cells.set(index, result); } return result; } public Iterator iterator() { return cells.iterator(); } } public class Cell implements Serializable { private static final long serialVersionUID = -2731510596752061219L; private String contents; Cell() { // } public void setContents(Object contents) { this.contents = contents == null ? null : contents.toString(); } public void setContents(int integer) { this.contents = Integer.toString(integer); } public String getContents() { return contents; } } Exception. Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'com.inexas.flashcards.client.reports.DataModel$Row' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized. at com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSer ialize (StandardSerializationPolicy.java:83) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Class.newInstance and Class.cast
I'm not sure that it does any good or not but if you need the method too you should star the issue by clicking on the link in Andre's post above and clicking on the star. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Class.newInstance and Class.cast
+1 It leaves me with a long and ugly if-then-else as a work around --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Help required when or how to use timer
Sure... > >4/ At the last interrupt have the object commit suicide and remove > >itself Feedback will wake up every, say, 250ms.. You want to keep a highlight visible for say 5 seconds so that's 20 wake ups. Count them. On the 20th you're going to set the background back to it's original color - probably white. When you've done that remove the association between the cell/row and the Feedback object and don't set the timer again. There's no more references to that Feedback object so it will be forgotten about and garbage collected. > >5/ On an edit clear any existing feedback objects and kill them. > >Instantiate a new Feedback object and forget about it When you start editing a cell check if there are any associated Feedback objects - there will be either 0 or 1. If you find one then remove it and set a flag in it to tell it not to change the background color of the cell and that's it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Help required when or how to use timer
That's a nice graphical feedback idea Suren (I'll steal it one day soon I'm sure ;-) How I would do it 1/ Create a Feedback object that has a time in side of it that takes card of the cell, row, etc.. Associated with the cell, row, in some way 2/ Inside the feedback object set the hot color as desired and the schedule regular intervals say 1/3 of a second giving a total of 15 interrupts. At each interrupt move the color 1/15th of the way back to white - quite easy to do if you split up the RGB values 3/ Have a poisenPill() method on the object that will terminate it 4/ At the last interrupt have the object commit suicide and remove itself 5/ On an edit clear any existing feedback objects and kill them. Instantiate a new Feedback object and forget about it Your users will be fighting to edit as many cells as they can as fast as they can --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Unchecked Exception
Yes --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
GWT tutorial
Just finished the last of the StockWatcher tutorial sections. It must have been a monumental piece of work to put the whole thing together - great work. Thanks. It would have been nice to have an easy route to submit corrections on the couple of typos I came across - a moderated wiki? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: how we can implement LazyPanel
Yes it can make a difference if you've got a complex app http://googlewebtoolkit.blogspot.com/2008/11/improving-performance-with-on-demand.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: supporting bookmarked URLs
I think you should be able to set up a wildcard url to map to a single servlet and then have the servlet do the switching for you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Is it not possible to include a Serialized bean object as a variable in another Serialized Bean..??
As far as I understand it, default ctors no longer need to be public since GWT 1.5. I define all mine private unless I need them On Jun 16, 3:17 pm, Jim wrote: > Change Department(){} to public Department(){} > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: how to modify the default port (8080) of hosted mode ?
In Eclipse you can modify the port on the Run or Debug configurations menu - took me a while to stumble on that one. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Thinking about learning GWT
But I would seriously look at using Google app spot. Deploying is easy and unless you've got a very successful application on your hands, it's probably for free. On Jun 16, 7:03 am, tedpottel wrote: > Hi, > I'm thinking about using GWT. Quastion, > will GWT run ok on my current web hosting service? Since it does not > support jsp, I'm assuming GWT will work, except for doing rpc? > - Ted --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: One class calling another class - this has to be simpler than I am making it.
1/ I would have started a new discussion thread rather than trying to change this one into a different discussion - your question is likely to get lost 2/ Take a look at the History and HTML links (see link below). You can add a list of links for the user to select the application state, you also get the back button out of the box. http://gwt.google.com/samples/Showcase/Showcase.html#CwHyperlink Keith On Jun 14, 6:14 am, Booth Martin wrote: > This has got to be simpler than I am making it. I have looked at many > examples and tutorials and either I am not seeing something, or I am not > understanding what I am seeing. > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Client side vs Server side models
I'm building my first serious GWT app and am looking for a 'template' model to structure things. On the client side I need much the same objects to populate the UI as on the server side to handle persistence. Let's say I need Employee on the client side to edit employee details and then I need Employee on the server side to persist it. As I understand it client side objects must be located in the package client.* and persistent objects in ...server.*. Therefore I need two Employee.java files - with slightly different contents - the one on the client side acting more or less only as a value object. Have I got things right? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---