I've been developing GWT applications for some time , This is my first time creating an app in GWT/Phonegap with mgwt.
I just migrated my old GWT project to phoneGap ,everything's fine , i can see my running GWT app on mobile.In my GWT website , I was using MySQL,Hibernate
Now I'm confused what i need to get connected my this Mobile App to a database. Can i use the same sql, hibernate..
Or i need something else, and writing all the queries again for mobile?
I found this during my search ..do i need to use this one..
https://code.google.com/p/gwt-localstorage-db/wiki/UsingTheApi
I was connecting to db in my gwt web app like this in my applicationcontext.xml class
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
default-lazy-init="true">
<!-- Datasource for LOCAL database connection -->
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost/leave" />
<property name="username" value="root" />
<property name="password" value="" />
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="annotatedClasses">
<list>
<value>com.leavemanagement.shared.User</value>
</list>
</property>
</bean>
<bean id="ManagerExams" class="com.leavemanagement.database.MySQLRdbHelper">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
@junaidp,
I don't know what GWT is. Java beans are not available via phonegap, but Java code can be added via plugins. You can create private plugins.
For your task, you need to use a plugin to access your DB. This is your search link for plugins. You will want to use "localstorage" for simple storage. For more complex storage on the device you have "indexDB" and "sqlite". If you need more storage, use on-line (internet) storage via a REST API - like parse.com or firebase.com.
-Jesse