I am creating an android application using the 2.2 API. I have created the layout of the app (Design interface) and now i need to populate my application with data.
For example, my application shall allow users of my uni to login and then find lecture (PDFS and POWERPOINT DOCUEMENTS) and be able to view them.
Now i am unsure whether to do this using a database where the files have been pre saved so when the user requires the files it is accessed from the database
OR
whether to have some sort of coding that directly links, say a button 'Lecture 3' to the actual web link of Lecture 3?
We have a Blackboard system which holds/displays all our lecture and labratory material, so i could have a link to the material held in the website?
I've heard of JSON, JQUERY but completely unsure on what they are lol.
I was going to use SQLite as my database, however, refering back to what i said before, i am unsure whether that can hold files (DOC, PPt etc)
Look forward to all your help
Thanks in advance
If you want to make your Application as off line(without internet user can access files) then Take files from server and store those files in Application memory and store that path in local data base.when you want to show those files to user take the path from data base,go to the path location and show files to user.
else download the files directly from server and show those files to user at that time only.
Related
I have a Mac Java application that needs to persist data across reboots. The data needs to be saved so that any user has access to it. E.g. an SQLite database file that can be used for all users.
It looks like the /Library/Application Support/ folder is supposed to be used for this, but I'm not able to write to it without making my app run as root or changing the permissions of the file to rwxrwxrwx.
What is the proper way to save application-level data on Mac?
The developer documentation covering this is a bit of a large topic:
https://developer.apple.com/library/Mac/referencelibrary/GettingStarted/GS_DataManagement_MacOSX/_index.html#//apple_ref/doc/uid/TP40009046
https://developer.apple.com/library/mac/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010672
According to the File System Programming guide you should make a specific subdirectory inside /Library/Application\ Support for your app to store app data common to all users on the system. I'd use reverse domain name notation such as com.yourcompany.yourapp or something else unlikely to collide with another app's use of the common directory for this.
You might also look into using an existing app bundler for OS X such as https://bitbucket.org/infinitekind/appbundler rather than hard code paths to file locations.
I am developing a website which basically crunches numbers from data files and display statistics.
These data files are on the client hard drive and the client can upload them to the server via the HTML upload functionality.
This however requires the user to manually upload the files to update the statistics on the website.
I would like to know if there is a possibility for the website to automatically upload these files when they change. I can see the gapping security hole with skipping the user action, but is there a way for an user to share a specific directory from his drive with a website ?
I am looking for something very lightweight and easy to configure as the user is not supposed to have any IT knowledge.
I am using Play! framework and the user can be on any OS with any browser.
As you are saying yourself, there is no way to do this from a website for security reasons. Services that automatically share folders like, e.g, Dropbox does, do so by installing "real" applications client-side. I'd assume most users still consider this "lightweight" from their perspective, although it means more development work on your end. It also does not require significant IT knowledge.
I have a web application that let users download files normally, and then later they can upload them using a simple upload mechanism (choose the files from directory and stuff).
Here's what I want to do: to have and "EDIT" button on my app, that download the file and open it automatically from the user's local drive. Then I want to check if there are changes, to upload it back to the server. Or, provide a way to the user upload it easily.
The options I've come so far, are:
Signed Applets
I find applets slow and "ugly". But it's the winning choice so far. It could download and open the file easily and then have an upload button, to put the file back on the server.
HTML 5 (File API)
I started looking into this and liked what I saw. But a lot of things that I saw are for local uploads, drag and drop and this kind of stuff. I'm very new to this technology and I simple don't know if it's doable.
A desktop application
I don't like this one but it's still on the table. It could one that monitors a directory created by an applet (here it's again), check if there are changes and then upload it back to the server.
Can someone provide me some help? If a can do something like that with HTML 5 or if there's a better solution.
You can't upload files without user interaction in HTML even if you try HTML5. That's against web fundemantals. The user has to trigger the file upload in a way, drag&drop, browse and select file, etc.
Signed applets might be a better solution than a desktop application because of the pain of the deployment.
If this file that you want your users to edit is just text based, I suggesst using an HTML based editor like Google does it for Google Docs.
The JavaFX 2 WebView component might provide me with a convenient way to connect my software to existing school data management web applications without needing a direct connection to the database. Right now a secretary would run an export from the data management program, save the data as CSV, then import the data into my program. This process might need to be repeated 30 times, so I am investigating other ways of extracting the data my software needs.
I wonder if the following solution is possible:
Emben a Java FX 2 WebView component into my program. The user would then log into the data management web application and extract the data the wish to import. Most of these school management programs support CSV and XML as the file format.
If I can extact the content currently being viewed by WebView, I should be able to parse the XML and import the data. This would be less steps for the user with the added benefit that I can infer information about the database structure from the XML export more easily than from a CSV file.
I didn't see any method in the Java FX 2 JavaDocs for WebView that does what I want. Is there a way to get the content from the page?
A WebView is a node that displays the content of a WebEngine. The methods you want are in WebEngine.
Ex: you can get the document using webView.getEngine().getDocument()
I'm working on a FLEX which enables the user navigate through a list of images at the server (BalzeDS tomcat 4.0.0.14931). The images stored under the "WebContent/Images", and the already available/ saved images are displayed as desired.
From this app user would be able to select a file from their local directory and upload it. I have done the necessary coding related with uploading the image and it successfully creates a copy at the desired folder at the server. Once the image file is uploaded I'm trying to display the it at the FLEX end, but the image is not displayed. When check at the target folder at the server end, the file has been created successfully.
In order to make the uploaded image visible, the BlazeDS Tomcat server has to be restarted. Since this is not desired way to go ahead, I am seeking some help from you experts out there to resolved this.
I tried searching the net get this issue sorted out, but unable to come cross any solution. An identical issue was posted on another forum (Tomcat restart problem), that also still not resolved.
I this is best approach to achieve this JAVA/ BlazeDS/ TomCat/ FLEX environment or is there a better alternative. The other alternative I could achieve this is through persisting the file into the database as byte[], but I did not want accomplish in that manner since size of the database tend to shoot up.
I would really appreciate if you could help me out on this.
Thanks in advance.
If you have to restart Tomcat, that means you are storing user data in your web-apps directory. You should not be storing any user data in the webapps folder. These are considered "system files" and should not be publicly editable under any circumstance.
Store any user data in a publicly accessible folder with the correct permissions and serve them over HTTP (you should be able to view it in a web browser).