How can a value be passed directly from a windows application into a field in an open web page? - windows

I have a problem that I feel is best implimented in a stand alone windows application, but needs to pass data to a web page that is already open.
Is it possible to pass the data directly to the web page?
If so, what is the best way to go about it?
(Its my first question, so go easy on me!)

This is not going to be an easy problem to solve, but I think it's possible by hosting the web-page in a browser embedded in a .NET application. This Code-Project article might help
Also this article talks a bit about accessing the DOM through a C# application.
Have you got any requirements on language? And can you add a bit more detail about exactly what you're trying to achieve?
EDIT 1: Watij is a web-application testing framework for Java. You can use it to fill in text-boxes, click buttons etc. I think it might fit your needs and, if it doesn't, it's open-source, so you might be able to hack it to work. There is a whole family of Wati* products - Watin for .NET, Watir for Ruby, etc.

Getting access to external web pages are not permitted due to security credentials.
But you can open and write to a web page via winInet APIs.
Please go through the article
http://www.informit.com/library/content.aspx?b=Visual_C_PlusPlus&seqNum=107

Related

Recreate a GUI for an application

im new here, lately i've tried to find a way to recreate a GUI for an application and still maintain his functionality.
Let's take SnapChat as example, i would redesing the application GUI but without editing that part of code that makes the application function.Im sorry if im not giving very specific explanations but i really don't know how to say it. Im really clueless on how to do so, and even if is possible in in the first place.
If someone could help me out it would be really apreaciate
So far i haven't tried anything bheside searching something online.
I believe you want to make a 'frontend' that looks like Snapchat and have it functioning like the real site. You will need to have a backend will all the features of Snapchat. Most websites on the internet have two parts to them - frontend and the backend. And most sites won't allow you to access their backend from other frontend for security reasons.
I personally don't use that site so I don't know about its features, but assuming it's a chat platform you will need user authentication and some way to store your messages.
You should start out with React or Vue.js, and work your way up to responsive sites like Snapchat.
A quick and easy solution would be to create an extension that changes the styling once the site loads on your machine so you don't have to code your own front-end.

Easiest language/framework to use for web app that follows MVC for someone who has experience with Java/JavaFX

I am trying to create a web app that allows the user to browse a noSQL (Preferably MongoDB) database and perform some queries using a graphical interface. All the queries are written in the code and the user only needs to click links and/or enter strings (mostly to search for matches to be displayed in properly formatted tables). The app follows MVC model.
Up until now I used to write similar desktop apps using Java and JavaFX. I have no experience with other languages or frameworks (Aside from C and SDL), neither have I ever deployed anything on a server, and the assignment should be completed within 6 weeks (Three other students are working with me). And I have the three following questions:
Which language/framework is easiest to learn (considering I/we know Java/JavaFX)?
The answer to that would most probably be JavaScript*, which takes me to the next question:Is there any (practical) way that I would make it possible to write the app without having to learn HTML and CSS?
The third and last question, in case I write the View class in JS or Angular, can I write the Controller and Modal with Java (If we disregard complicated workarounds)? And do I deploy all three MVC classes/packages on the same server?
*I believe some would suggest we use GWT or Vaadin, and in this case I wonder if these frameworks have any quirks or limitations that would make it difficult for us as students to work with, be it when it comes to deployment (which is totally new for us) or the writing of the code itself.
Thanks a lot in advance.
Since nobody answered I am posting the best answer I could find so if anyone googles this subject could read it. At last we went with Java for backend running on Tomcat server and JS for front end. It turns out that HTML is very simple and JS is pretty similar to C/Java in syntax.

How do I send an email from my webpage?

I am not a web developer but I do have a lot of programming experience in C# and Windows forms programming. On our company webpage my boss wants me to put in a textbox where visitors can submit a comment and press a submit button and that comment will be sent to an email address. Right now, our website uses just plain old html, no php or javascript or anything like that. I am wondering what is the simplest way to accomplish what I need? Can someone point me in the right direction? The website is hosted on an Apache server so I won't be able to use aspx.
The simplest method depends heavily on what is available. If PHP is supported, use it.
Here's a simple example (I wouldn't focus too much on their HTML -- which is a bit shoddy) but the PHP at the bottom to give you an idea on how to pull the <form> in and send the email.
If you don't have PHP and don't want to install it, you can do this without any server-side code and outsource the problem. Bravenet (a name that will be familiar with any old-school webdeveloper) have a free hosted form solution that lets you post your forms to their server and they email you the result.
Not amazingly professional, but takes about 10 seconds to implement.
The simplest solution would be have the form action as "mailto:email#address.com"
However, this has the downside of the email address being sent to being exposed to spam bots, along with the clients mail application having to load to send the email which can be confusing and slow.
Sending emails in PHP is common, and there are thousands of articles out there on how to do it, here's one
In this case the most simple way is to install PHP to your apache to use the mail()-function.
Of couse you could use tomcat additional to apache, but the configuaration is much more time-eating.
If you don't want to use any sort of scripting technology, then the form mailto might be your only option. You can just make the action of your HTML form mailto:youraddress and the form post will be mailed directly.
I would highly recommend looking into some sort of scripting technology though to do this in a more reliable way....PHP looks like a good fit in your environment.

Is it possible to Drag-and-Drop images between Web sites (applications)?

There are a number of questions on stackoverflow about drag-and-drop but I can't see that any relate to this question specifically.
Question: Is it possible to drag-and-drop an image from one Web application (or site) to another Web application (not the same window etc.)?
I'm not looking for specific technologies that may help one achieve this, just if it is possible with Web application security restrictions.
For example, I've read that it's not possible for one Web application's Javascript to mess with the DOM of another Web application (for obvious reasons).
I just want to be able to drag an image displayed on one Web page into a Web application on another page (and for that application to have full access to the image).
Thanks,
Ashley.
Drag and drop is not defined within html. Many browsers (not IE IIRC) support drag and dropping image URL's into text boxes. So if you drag an image from a one site and drag it into another site's textbox you will have the full URL of the image. You can have JavaScript take it from there
I don't think this is directly possible without Gears.
EDIT: The Desktop API provides drag + drop.
It's really a question of data handling in the browser. If there were no security issues involved this would be a piece of cake ... but there are security issues, big ones. Any time you permit data from site X to be introduced to site Y in a programmatic way you are opening a door, and it's very difficult to find the right balance of "useful enough to permit exciting new functionality" without going all the way to "bending over in the shower in prison to pick up the soap".
Cheswick and Bellovin say there are two basic approaches to security:
That which is not explicitly forbidden is permitted.
That which is not explicitly permitted is forbidden.
Microsoft basically went with #1 and you can see where that leads to. Most paranoid sysadmins go the route of #2 with a vengeance. Opening a big door between two unrelated sites would send most of us screaming off into the woods.
Unfortunately, although browsers & web site people are mostly (somewhat?) aware of this problem and are trying to deal with it, companies like Adobe and their "flash storage" are creating more and more problems.

How is AJAX implemented, and how does it help web dev?

From http://en.wikipedia.org/wiki/AJAX, I get a fairly good grasp of what AJAX is. However, it looks like in order to learn it, I'd have to delve into multiple technologies at the same time to get any benefit out of it. So two questions:
What are resources that can help me understand/use AJAX?
What sort of website would benefit from AJAX?
If you aren't interested in the nitty gritty, you could use a higher-level library like JQuery or Prototype to create the underlying Javascript for you. The main benefit is a vastly more responsive user interface for web-based applications.
There are many libraries out there that can help you get benefit out of AJAX without learning about implementing callbacks, etc.
Are you using .NET? Look at http://ajax.asp.net. If you're not, then take a look at tools like qcodo for PHP, and learn about prototype.js, jquery, etc.
As far as websites that would benefit: Every web application ever. :) Anything you interact with by exchanging information, not just by clicking a link and reading an article.
Every website can benefit from AJAX, but in my opinion the biggest benefit to AJAX comes in data entry sections - forms basically. I have done entire sites where the front end - the part the user sees had almost no AJAX functionality in it. All the AJAX stuff was in the administration control panel for assisting in (correct!) data entry.
There is nothing worse than submitting a form and getting back an error, using AJAX you can pretty much prevent this for everything but file uploads.
I find it easiest to just stay away from all the frameworks and other helpers and just do basic Javascript. This not only lets you understand what's going on under the covers, it also lets you do it in the simplest way possible. There's really not much to it. User the JS XML DOM objects to create an xml document client side. Sent it to the server with XMLHTTPRequest, and then process the result, again using the JS XML DOM objects. Start with something simple. Just try sending one piece of information to the server, and getting a small piece of information back.
The Mozilla documentation is good. Sites that benefit from it the most are ones that behave almost like a desktop application and need high interactivity. You can usually improve usability on almost any site by using it, however.
Ajax should be thought of as a means to alter some content on a page without reloading the entire page.
So when do you need to do this? Really only when you have some user interactions or form information that you want to keep intact while you change some content on the page.

Resources