Open Microsoft Access Database in Blackberry Phone - java

Is there a way i can use an access database from my Blackberry Curve?
All i want is to be able to open the DB, open table and run queries.
How?
Thanks,

I'm not sure that's going to be possible due to the size of the engine needed to interface with Microsoft Access. Perhaps something like SQLite would be better? If you already have data in Access, then transforming it into something like SQLite first?

As a general rule you have to either adopt some web based technology, or at least get your hands on some developer tools that work on the particular product in question.
Obviously access does and run on Linux or a Mac Computer. Obviously word or excel does not run on your smartphone either.
However most smartphones do support web based technologies or have some type of web browser.
Access 2010 allows you to build web based applications. I'm currently testing and playing with some of my access applications on an apple iPad right now, and they work great.
For couple small little forms, it's probably likely cheaper and better to adopt some web based development tools like asp.net, but this is all going to come down to what type of infrastructure and web servers and other resources you have at your disposal within your organization to bring into play here.
You can take a look of the following video of mine, and you'll notice at approximately the halfway point, I switch to running the access application 100% inside of a standard based web browser.
http://www.youtube.com/watch?v=AU4mH0jPntI
So Access 2010 + sharepoint allows you to build 100% browser neutral based applications. This means no ActiveX or even Silverlight is required. Thus the resulting access application will run inside most modern browser, and this includes most smartphones.

Related

What is the purpose of web server in a local web application?

I am sure this sounds silly, but for a beginner like me, this is cooking my brain up and I am not able to proceed in my quest without clearing this.
Lets say I am building a simple java command line calculator application that takes 2 numbers and an operator as input and returns the operation's result back to the user. Now, I want to build GUI on top of it (similar to like an online calculator). For this, I decided to build a web application so that I can open the application on my browser and use it seamlessly. It leads to the following questions in my head
Will I have to build a web server in java to allow communications between the front end/GUI and the back end? There is no communication with any other networks, its strictly local; yet I am having to create a web server to make this work and that is confusing me. Or do I need one because I decided to build a web application meant to be opened in a web browser? Or is the reason something else entirely?
If I instead decided to build a windows/android/mac/ios application, would I still to bake a web server for communicating? Or can I use something like swings (I know its really primitive) to do this which essentially would allow the GUI to directly communicate with the business logic?
I know front-end languages like javascript allow me to code the entirety of the calculator in itself, and as a result eliminate the need of a web server. However, what if I was building relatively complex application with a backend database, like spotify? (within the same constraint that the application doesn't need to communicate with other applications and all data is stored locally) Would this solution still work?
In brief, I am failing to understand the purpose of building an entire client-server infrastructure even though the entire thing is local and offline(if that makes sense?). Or is my very basic understanding of client-server flawed?
If you want to use a web browser as the tool to interface with your Java app, then you need a web server. The browser is simply an app that tries to make a network connection with another app, and passes some text as defined by the HTTP protocol.
You would have a choice of three scenarios for this:
Write an app that accepts network connections, processes HTTP, and sends back a response.
Write a Java app that uses the very basic web server built into Java 18 and later. Note that this web server is not intended to be a feature-rich or commercial-grade server.
Write a Jakarta Servlet class that runs on top of a Servlet container with a web server. For your needs, either Apache Tomcat or Eclipse Jetty would work well as both the Servlet container and the web server.
For your scenario, the middle option using Java JEP 408 seems most appropriate and easiest.
You said:
There is no communication with any other networks, its strictly local; yet I am having to create a web server to make this work and that is confusing me.
A Border Collie dog herds sheep. That is its most basic basic core mission. Those sheep can be herded across the hills of a mountain range or they can be herded locally within your own farm.
A web browser makes network connections. That is its most basic core mission. Those network connections can be made over the actual network or they can be made locally within a single computer ( a “localhost”).
You said:
Or do I need one because I decided to build a web application meant to be opened in a web browser?
Yes a web application accessed by a web browser needs a web server, by definition.
You said:
If I instead decided to build a windows/android/mac/ios application, would I still to bake a web server for communicating?
Or can I use something like swings (I know its really primitive)
There is nothing “primitive” about Swing. It is a fully-developed feature-rich GUI framework. Swing comes built in with every JDK. And Swing will be supported for many years to come.
However, the design and features of Swing may or may not suit your tastes. And Swing is now in maintenance-mode.
An alternative is JavaFX, now actively developed as the OpenJFX libraries.
To use JavaFX, you must either add the OpenJFX libraries to your project or else deploy to a JDK that comes bundled with the OpenJFX libraries (ZuluFX, LibericaFX, etc.).
to do this which essentially would allow the GUI to directly communicate with the business logic?
Yes the GUI and and your calculator business logic would all be plain Java classes, all peers, all running together within the same JVM.
You said:
I know front-end languages like javascript allow me to code the entirety of the calculator in itself, and as a result eliminate the need of a web server.
Yes. You could cook up JavaScript code to implement your little calculator. This JavaScript could be placed within the text of a file with the HTML of a web page. That web page file could be opened locally by the web browser. Your HTML and JavaScript would render. No web server is needed in this scenario.
But this scenario eliminates Java, and you said you want to (a) write your calculator in Java, and () use a web browser. So we go back to the three options listed above.
You said:
However, what if I was building relatively complex application with a backend database, like spotify? (within the same constraint that the application doesn't need to communicate with other applications and all data is stored locally) Would this solution still work?
Yes you could deploy a database server on your local machine. Then you could find and use a JavaScript binding tool to talk to that database.
But then you would not be using Java and all its goodness. For that scenario I would choose to write a JavaFX app with an embedded Java-based database engine such as H2. This would result in a single all-in-one double-clickable-app solution.
But that would be my choice based on my own preferences and skill set. Other people might choose other solutions.
the purpose of building an entire client-server infrastructure even though the entire thing is local and offline
👉 The “offline” part may be distracting you.
Conventional computers with modern operating systems such as macOS, BSD, Linux, Windows, etc. are always “online” in that they all maintain a networking stack. That network stack can be used locally by processes within the one computer to communicate with each other. Whether you happen to have an Ethernet cable plugged in, or WiFi turned on, makes little difference to the computer. The networking stack in the OS is still available and active regardless of outside network access.
So client-server architecture works just as well within a single computer as it does between computers. (Actually, it’s works faster locally, as hopping on and off the network is terribly slow.)
Why choose client-server architecture for a local app? Either:
You are skilled in, and prefer, the tools for a client-server architecture.
You want to eventually move from local-only to being networked.
If neither of those two is true, then the JavaFX with H2 solution I mentioned is likely a better fit for a Java programmer.
By the way, let me put in a plug for Vaadin Flow, a GUI framework for building web apps in pure Java.
It's not completely necessary to bake web server to host your application even with embedded tomcat application you can host your application. However, main purpose of webserver usage is for setting up your reverse proxy so that your application behind that won't be exposed and your webserver will be acting as endpoint to outside requests.
In case for hosting application in local webserver is not at all required webserver will come handy when your application hosted in production environment.

Options to re-using an Applet's existing code?

After five and a half years full-time work on a product ranking engine project, which revolves around a 64,839 line applet, the browser companies have seen fit to dump applets.
At this point I am in no position to convert the applet to another language (unless I get a huge injection of funds to hire a team of programmers). My partner is not going to support me for another two years.
I know the questions are rather vague and I should be keeping up with the latest tech, however I've had chronic earaches for 14 years that affect memory and concentration, so programming is difficult enough without trying to keep up with the latest developments in software as well. The reason I am asking for advice is that I don't want to make another monumental screw up.
Question 1: My understanding is that Java Web Start launches the application, but it then cannot communicate back to the JSF web page any more (JSF2.0). Is there any way of getting around this?
Question 2: Can anyone suggest any other options other than re-coding the whole thing?
Question 3: Is it likely that applets will be altered to use the latest plugin format or are they gone for good? Does anyone have any inside information on this?
Overview of the applet's requirements:
The applet allows a user to customise some or all of the product ranking criteria, which has been preset by a panel of knowledgeable experts, to their own particular needs. The criteria is stored and edited via graphs (custom painted jPanels).
The ranking criteria can be altered entirely using the mouse (to change the graph shapes), though some values can be entered using the keyboard if the user wishes. Once customised, the applet is then used to submit the changes to the ranking engine server.
It is also used to allow third party experts to alter the ranking criteria to create their own product usage category ranking criteria. The third party expert can then place links on their own web site that will allow users to rank products using the third party expert's own ranking criteria. This allows anyone to create their own ranking criteria for use by others.
The applet uses a plugin bean that is also used in a standalone Java editor application, which is used to create a product usage ranking criteria file from scratch (the editor is 77,710 lines of code, though 61,257 lines of that is the plugin which is also used in the applet). This means most likely having to convert the editor as well, as the two are inextricably linked. The plugin basically is the applet and also the editor.
The plugin can capture, edit and store ranking criteria for virtually anything the human brain can rank. Thanks to the graphs, it can use any attribute that the brain uses, and for which we have no formal system of measurement; hence why the applet is so damn big.
Your question is probably too broad for Stack Overflow, but I'll give a brief response.
Java Web Start
Java Web Start is probably the best route for you. This technology is basically a convenient way for a user to obtain, install, and run a Java desktop app. The web browser is only used to initially download a small XML file describing your app and where to get the app. The Java Network Launching Protocol (JNLP) defines these pieces of information stored in that XML file. Your app will be downloaded from a server, and saved to the local machine. A Java Runtime Environment (JRE) can be downloaded and installed if need be as part of the process.
By default the app runs within a security sandbox similar to Java Applets. But you can sign your app and define security protocols to break out of some of those restrictions including making network connections.
The bulk of your programming would remain intact. The app is still pure Java, running in a JVM. You would need to do a bit of reprogramming to be a desktop app rather than packaged as an Applet. And you would have to learn about easing those sandbox restrictions. And your app will have a menu bar of its own as a full-fledged app, so you may want to take advantage of that. But the guts of your app would remain the same.
Over the years, Sun & Oracle have put efforts into improving Java Web Start. Unfortunately it came too late after Java-on-the-desktop had lost too much mind-share. And Swing never got the overhaul it so desperately needed. So Java Web Start never went big-time. But Java Web Start does work as advertised, so give it a try.
While there were some security issues years ago, I believe they have been resolved long ago. The many infamous security problems with Java were largely involving the web browser plugins bridging between browsers and the Java JRE; those problems do not affect Java Web Start (though you should do your own research to confirm).
For the general public, Java Web Start may be too much to ask of new, anonymous, and less-motivated users. For a commercial product with a user-base of eager customers, it may the perfect solution for you. I suggest you do some more study, read the Wikipedia page, study the Oracle technology page, look at the Tutorial, read this overview by John Zukowski that includes an example of network (making socket connection to time.nist.gov), and so on.
Vaadin
The Vaadin framework is an open-source free-of-cost professional user-interface development framework that uses pure Java to run your app on a server in a Java Servlet web container while automatically generating a user-interface using standard web technologies (HTTP, HTML, CSS, JavaScript, GWT, WebSocket, etc.) for presentation within a regular web browser (Firefox, Chrome, Safari, IE, Edge, etc.). As a graybeard, I think of Vaadin as an X Window System for the new millennium: The user interacts with screen widgets on their local computer but the business logic of the app is executing on the server, and the server is updating the remote UI as a result of that business logic executing.
Vaadin is not yet-another-web-templating system. Instead, your app is written in pure Java. No need for you to learn the alphabet-soup of web technologies listed above. Vaadin takes care of that for you, auto-magically. You say in Java “I want a label, then a field, and a button” and Vaadin makes those appear in the web browser.
Using Vaadin would allow you to retain your Java code for the business logic part. But you would need to re-write the user-interface parts to use Vaadin widgets instead of Swing widgets. This would not be so terribly difficult as Vaadin was inspired by the general style of Swing, defining layouts governed by layout managers in which you place your various widgets (fields, labels, buttons, etc.).
Vaadin can make very professional business-oriented apps that feel almost like desktop business apps. Tip: I prefer the Reindeer theme for business apps over the newer Valo theme.
But you mentioned some kind of free-form drawing canvas in your Swing applet. That may be a sticking point. I do not know of such a widget for use within a Vaadin app. I am not saying there is no such thing, I just do not know of any. There are slider widgets that may useful, but I don't clearly understand your needs in that regard.

Which option is suitable to replace Java Applet?

I would like to replace Java Applet which currently needs to use client's resources, i.e. external readers, and to communicate with a server via socket.
Reason:
1. I have thousands of client machines using this Java Applet program, and most of them are running out-dated JRE. When the Java Applet program is updated / added new features, all client machines will need updating the latest JRE.
Expected Solution:
The Java Applet program would be expected to be replaced by a web-based application, which allows to compile and run source code at client's side such that the new web-based application could still use client's resources and communicate with server via socket.
Can I use JavaScript to achieve it?
I would very appreciate your help/suggestion for this problem. Thank you!
JavaScript is a scripting language that gets evaluated in the browser.
I would not describe it as compiling and running but yes, it does mean you can run code in the client and is commonly used to create applications that run in the browser.
There's a staggering amount of frameworks that you can use to write your application. Take a look at the TodoMVC site to see the same TODO app created using several different frameworks.
If you come from Java applets, GWT may be interesting to look at.
If you wish to let the JavaScript client listen for messages from the server, take a look at websockets.
The smart card reader is going to be a problem, though!
See Architectures to access Smart Card from a generic browser? Or: How to bridge the gap from browser to PC/SC stack?
By the way:
The real issue with outdated JREs is not that your code will not run on old JREs, you can create perfectly fine applets using java 1.4 or java 5. Any libraries you may need you can deploy alongside your applet. The pain is a security problem. Anything but the latest version Java plugin is getting actively exploited and puts the user at risk. Occasionally, even the latest version is not safe.
try socket.io
I think this is the latest technology you can use to communicate with client browsers. it support the latest browsers and mobile browsers too.
hope this will help you.
Javascript has become very powerful with HTML 5.0. Here is a list of new elements that you can use to access all kinds of resources, including local files, audio, video, GPU rendering (canvas + WebGL) and GPU compute (WebCL). Here are even more things you can do, including database connections and networking. You can even create offline Javascript applications.
jQuery and jQuery layout make robust GUI development a lot easier. Rich tool suites, such as Google Closure offer optimization and a compiler for improving performance and detecting obvious mistakes early in the development process.
W3 offers useful stats for making an informed decision on how many users on average have access to which features. Note that the most annoying guy in that list arguably is IE8 due to it's lack of proper HTML 5.0 support.
In case you want to stick with Java, then one alternative would be to use my http://bck2brwsr.apidesign.org project. It's goal is to create small Java that can run in 100% of modern browsers without any plugin installed.
There are Java bindings to HTML (via knockout - one of the four most popular frameworks for HTML5) and that is why one can code whole business logic in Java and just render it via HTML. Should be enough to replace most of the applet UI.
In addition to that there is an experimental API to render on HTML canvas. People use it to write Java games that run in a pure browser.
There is a simple way to communicate with server via JSON REST API or via WebSockets. A live example is here.

How do I make a simple web app with log-in?

I have been doing android programming for a while now but only as a hobby. I know the basics of java, and can say I have a solid understanding of PHP and MySQL (I once followed a tutorial that showed how to create a very basic content management system). I've been wanting to expand my knowledge beyond the simple android apps I've made and recently had an idea for an android app. In this app, the user would create a Username and password the first time it is ran. From then, the user can fill out a form. From what i know so far, the valuesof this form can be stored in a MySQL database. So basically every user needs to have their own set of variables stored (which are not a lot). As I been looking around, i think there are many ways to create a web app, and there are different frameworks for doing so. I read I can create a web app with log-in, using ASP.NET. Can this be done using java? I just need some general guidance. I want to make the web app standalone, and then focus on creating an app for android that uses it.
I think good platform for your kind of case is to use Google App Engine (GAE). It provides platform to do your web-service with Java (or python if you prefer). It is also free for low amounts of traffic (like your service) and they have really good tools to manage the site (check the database entries, usage statistics, etc.).
Google has written a good set of tutorials to build webservice with Java in GAE:
http://googcloudlabs.appspot.com/
AppEngine documentation main page:
http://code.google.com/intl/fi-FI/appengine/
Signup here:
https://appengine.google.com/
I think you may want to look at JavaServer Pages.

How to take a Java Web-application offline?

We develop Java Web-aps (Websphere, DB2) which display graphical and databased information. We would also like to offer the same application offline (distribution via CD/DVD) with online data-update. We have tried a number of alternatives in the past, but nothing has been really stable. What are the new best practices to take a Web ap plus data (in a small database) offline?
I don't know how well it works with the CD/DVD distribution front, but the first thing that comes to mind is Gears. On the .NET side of the fence there's Silverlight 2. Then there's the Mozilla Prism project, although I don't know how far advanced that is.
These are all designed for not just offline access, but mixed offline/online, talking to a server when it's available and working locally when necessary.
I'd suggest using Apache Derby as the database (also available as Sun's Java DB, and possibly still IBM Cloudscape (does that still have DB2 compatibility in place?)).
I'm sure there's plenty of Web servers/Servlet containers about. Apache Tomcat is the obvious one. An alternative approach would be to use an embedded native browser within a single Java process. That approach should be relatively hassle free for users and tech support, and you can just use WebStart to install and update.
If you're using EJBs and other nonsense, then there are similar freebies about. I understand Sun Glassfish is nice and fast starting.
You could create an image of your server as a VMware instance and distribute it with a copy of VMware player (licensing allowing of course). Personally I'd build it on top of a Linux distribution like CentOS5.
You can bundle a JRE along with JETTY server and use a different database e.g HSQLDB (that you can bundle inside the webapp itself).
If you are using an ORM tool to connect to database, you might not have to make many code changes for this.
A lot of Application server distribute their admin consoles like this.For e.g Weblogic admin console runs offline (it uses internal ldap server for its database)
Also as far as Google gears is concerned, they are also pretty much doing the same thing.
They have a server that is bundled along with SQLDB and they allow to synchronize the data between online offline app.
You can sync the data too (use webservices in the online app) and talk over https from the offline app to sync the data, if you need the sync feature.
Also you can check this link
http://developers.sun.com/learning/javaoneonline/2007/pdf/TS-69700.pdf

Categories