How can I create my own web project? - webproject

I've been searching for a long time to find a proper answer this question but couldn't found a satisfying one. Please note that I'm very unexperienced about programming/coding. I only have basic HTML/CSS knowledge. I'm trying to learn programming on online sites like codecademy, freecodecamp and etc. but so far, they seemed that they are only teaching the synthax of the languages and not to build your own project with on your own and in your own computer.
So, as a very beginner please guide me. What should I do? What I have to learn first and from where?
Thanks.

Cool that you already have the HTML/CSS basic knowledge. Now you need to add some action to that to be able to build a web application.I assume that's your ultimate goal.
So any web application consists of 3 tiers (the simple ones),
enter image description here
picture from www-igm.univ-mlv.fr
browser (so the user can open your application)
application server ( a machine having some software installed to process the user requests I am trying to make it so simple for you)
database server to store the data and also you can query the data back from there.
Ok cool. so to build a web app you need to have the above 3 parts exist in your machine.
You already have your own browser (Firefox, Chrome, IE, etc.)
You need to have some kind of application server.
You need to install any database server.
Ok let's talk about building the application,
To make things simple to build any web application you need to build 2 parts,
frontend ( what gets displayed for the user in his browser)
backend (Will be living inside the application server)
You already have the basic knowledge of HTML/CSS so I assume also you can create a form using html tags.
<form name="info" action="/submit" method="post" >
<input type="text" id="firstName">
<input type="text" id="lastName">
<input type="submit" value="Submit">
</form>
that's a simple form using html tags. (that's considered the frontend for your application.
Ok now we need to build the backend. to store the this data in the database.
the backend will reside in the application server tier. who will take care of executing it and responding back.
So in the form tag above we have this attribute action="/submit" the action is the url of the application that's going to receive the submitted form data. and then the code inside the application will read the data and then it will talk to the database and it will store it.
I hope that can give a basic picture about a simple web application.
If you don't have any knowledge of any programming language start with JavaScript for backend.
You can watch the podcast for a JavaScript framework called sailsJS I hope these videos will help you to build your web app,
https://www.youtube.com/watch?v=xlOolpwwGQg&list=PLf8i4fc0zJBzLhOe6FwHpGhBDgqwInJWZ

Related

How to Open a Browser and connect to a website then parse that website using jsoup in java?

I have a project which needs a little bit of web-scraping. The main requirement is to let the user enter his data on a java application. Then the application will connect to a data entry website then it will automatically inputs the data entered by the user to that website. I haven't started to code it since I don't know where to start. I already conducted some research about this and it points me to jsoup and desktop api(jsoup for webscraping and desktop api for opening a browser). Hope to receive a reply from the Java experts here.
Thanks!
JSoup will certainly do the scraping for you. However you need to handle HTTP (GETs/POSTs etc.) and for that I would recommend Apache Http Components.
I'm not sure you want to open a browser. Rather I would expect you to ask the user for input (perhaps via a Swing UI, or a browser-based UI) and then talk directly to the website using HTTP. I don't think you'd need to open a browser to the destination website. If you do, then check out Watij, which allows you to drive a browser directly from Java.

CassiniDev embedded in WinForm app?

I am trying to put together a winform app that also has a web interface that can interact with events generated from within the winform portion of the app. I am successfully running the cassinidev server from within the app and asp.net pages are being processed but I am still running into a few obstacles and I am not sure if they are even possible???
I am unable to use code behind pages. I have added the appropriate
attributes to the page directive but I still cannot access controls
from the aspx page.
I am unable to access classes from the web portion of the app. See
screenshot...
Maybe what I am trying to accomplish is not even possible but if anyone can help to point me in the right direction I would be most grateful!
I'm pretty sure you can't do that since the only thing you have available is the "website path" option.
You do however have the source and if you find some way of sharing data (maybe using the ApplicationPool) you could probably do that...but i'm guessing you'd still need to cast that data on startup to a static variable in your website.
Seems like too much work 2 me.
I'd suggest selfhosting WebApi as well and then just using that as the data layer of your website.
Both can be hosted in winforms and webapi CAN share static data directly from your code :)

Create a Phone Application base on an Asp webApplication

I have to develop a phone application on every platform so I thought of using phonegap. Seems pretty nice.
I have a web application coded in classic Asp and it's this webApplication that I need to strip down to be a phone app.
At first I thought it will be simple, my classic Asp render some html so phonegap is able to put it as an app.
But it's not that simple, because in my asp I have some code that is rendered server side, I've talked to some who tell me that some html could call the asp pages and this html could be used in phonegap. Don't think it's possible ...
Well if someone could help me here, maybe i've said something wrong in my little text don't hesitate to correct me :)
My solution (I think) : code some webServices in asp.net that will use the same database as my asp classic web application. And some html and jquery will call the webservices and those html and jquery will go trough phoneGap
What is the best way to transfer and asp classic web app to a multiplatform phone app ?
EDIT : After looking everywhere, effectively phonegap can't use asp pages. So I'm questionning myself should I do a mobile website or a mobile app with webservices?
EDIT 2: I'm going for an asp.net mobile website, someone have a great way to do this, I've seen the answer proposing mvc... more details?
You are on the correct path in wanting to use PhoneGap to create a multi-platform phone app via HTML5, and some mobile framework like jQuery Mobile.
Yes, you can leverage the power of ASP.NET to serve up your data but I wouldn't create an asmx web service. A SOAP-based service serving up XML may be too fat/overkill for your mobile web app. Instead, you may want to investigate using JSON which is more lightweight (remember, bandwidth is a concern with mobile apps). One can rapidly create an API to serve up your JSON data via the new ASP.NET Web API. With your API exposed, you can make an ajax call from your html page to retrieve the JSON and bind it using jQuery.
The bonus to using the ASP.NET Web API would be when it's time to upgrade that classic ASP web site you have there, you could leverage the API you already created.
I'd really consider rewriting the website using Mvc.Net. You may want to consider using the iUI for the views.
It will be much cheaper long-term to use modern technology than trying to shoe-horn legacy code into new usage areas.
It looks like you've made up your mind to go with a webapp instead of native apps via PhoneGap. I would recommend that you pick up this book by Jonathan Stark. It's very short - shorter than it should be when it gets into using PhoneGap - and although it focuses on iPhone development, much of the content is applicable to most mobile devices. The first few chapters give a great introduction on developing attractive, responsive, highly usable web apps for mobile devices. If you familiarize yourself with jQuery and jQTouch you can get some really great looking apps with relatively little effort, regardless of the server side technology you go with.
So i'm questionning myself should I do a mobile website or a mobile app with webservices ?
The answer to that question is always mobile website... given an outdated website that the client is wanting duplicate functionality in an app.
Do the work to convert the website or at least the portions that you need to use ajax and webservices. Once you have that in place pulling the same data to place in a mobile app will be easy... you've already done it once.
So my approach would be to convert this dataview into two separate elements Data and View.
You can probably even keep the current asp pages without a lot of modification to the code since you can still call these web-service functions the same way as before in your asp code.
Well, if you really want to reuse your existing webpage you can do the following.
Create a index.html and the body.onload event, redirect to your webpage.
Then build this index.html with phonegapbuild, and you will get your "native" application that simply loads your existing webpage.
If you want to serve mobile users, you have 2 main options:
Create a mobile website. You can render html on the server all you want, no javascript programming needed. Maybe look into jQuery mobile, it can be a cheap and easy way to make the website better for mobile users.
Create a html web app (and package it inside PhoneGap if you want). This is basically a html page which loads just the data from the server in json format and updates the page contents dynamically with javascript. You need good js skills to implement this, you're server is just a REST api that server json - technology can be anything, at least asp.net mvc makes it easy. On the client side you'll want to use some good structuring frameworks, backbone.js ( http://documentcloud.github.com/backbone/ ) is a good option. Check out http://m.linkedin.com for an example of what a mobile web app can be.
3rd hidden option: just create a native app for each platform, that'll get you the best user experience.

static website generator

I was recently asked to create a web page using a static website generator, like Jekyll. My question is this:
How does this differ from just creating a website using HTML or writing the page as an ASP.net project in Visual Studio?
How does it work on the server?
What are some concerns I should have?
I'm a .net guy, so I would like to be able to create this in visual studio, if possible.
Here are some advantages and disadvantages that came to my mind:
Advantages
can be deployed on every server, as it's just static html
has partials, that can be reused, in contrast to normal html, where you have to code/copy paste every thing
you can still code in an IDE
a non developer can edit code (sometimes at least)
Disadvantages
the template language is limited and sometimes a bit awkward/needs to get used to
you have something new in your environment, which has additional costs (more than one developer needs to know how to build the site, ...)
If you know your current toolkit well and you do not have a problem hosting another ASP.net project on your server, I do not see the need for you to introduce another tool in your tool chain.
If you want to do something, where users can generate content - like github does on the github pages - this is something you might consider.
As for Jekyll, we tried it on one project and being devs, who like to code, we ran into it's limitations quite early. You can work around this, but if you know a programming language you will be faster. It was still fascinating, how far we were able to go with just using Jekyll
With ASP.NET pages exist throughout the life cycle of the page, and able to work with request and session context. See this article asp.net page life cycle
HTML pages are static and you can not access any variable that is on the server.
I recommend you follow the step by step this link to go to just understand how to develop ASP.NET http://www.asp.net/get-started
I hope that helped
Vicente

Web App architecture questions

Background:
I am an intermediate web app developer working on the .Net Platform. Most of my work has been defined pretty well for me by my peers or superiors and I have no problem following instructions and getting the job done.
The task at hand:
I was recently asked by an old friend to redo his web app from scratch. His app is extremely antiquated and he is getting overwhelmed by it breaking all the time. The app in question is an inventory / CRM application and currently each customer requires a new install of the app (usually accomplished by deploying it on a different domain on the same server and pointing to a new database).
Currently if any client wants any modifications to the forms such as additional fields, new features, etc my friend goes in and manually adds those fields to the forms, scripts, database etc. As a result all installs of this application are unique. There is no one singular source repository and no one single version of this app. Generally new features are overtime rolled into the other sites, but still this is done on an individual site by site basis.
I will be approaching this on a very modular basis. Initially I will be coding a module that will query an external web service for some data, display and store it, and periodically update it automatically. The next module will likely be for storing and displaying inventory data. This way I want to over time duplicate the current feature set of his app 100% but do it incrementally.
The Million Dollar Questions
I want to make the app have user
configurable form fields. The user
should be able to go to an admin
page, create a new forms page of a
certain category, and then specify
what fields he wants in there. He
could say 'create a new text field
called Item # and make it a
requirement" and that will get
stored somewhere. All forms will be
dynamically rendered to screen based
on what the user has configured. Is
this a good way to go about the
problem of having no idea what a
customer could want in a form? and
thus be able to store and display
form data of any sort ? What sort of
design pattern should I follow here?
I am familiar with asp.net and
the .net framework in general and
have decent knowledge of javascript,
html, silverlight, jquery, c# etc
etc. I can work my way around web
apps in a good way, but I am not
sure what sort of framework or tech
I should use to accomplish this
task. Would ASP.net 3.5 webforms be
the way to go? or should I look into
ASP.NET MVC? Do I use jquery and ajax for
complete decoupling of frontend and
backend ? or will a normal asp.net
page with some spattering of ajax
thrown in working with a codebehind
be the order of the day?
Just looking for general advice before I start.
I am currently thinking of using ASP.NET 3.5 webforms, jquery for clientside animation, ui, manipulation and data validation, and sqlserver + a .net or wcf webservice for backend.
Your advice is much appreciated as always.
I've recently implemented a white-label ecommerce system for an insurance company that allowed each partner to choose their own set of input fields, screens, and order the flow of the application to suit their individual needs.
Although it wasn't rocket science, it added complexity and increased development time.
Consider the user configuration aspect very carefully In hindsight both my client and their clients in turn, would have been happy with a more rigid system.
As for the tech side of your question, I developed my project in VS2005, using asp.net webforms and webservices with a SQLserver back end, so the stack that you're looking at is definitely capable of delivering a working product. ASP.net MVC will almost certainly help as far as testability goes.
The biggest thing I would change now if I was going to start again would be to replace the intermediate webservices with message based services using nServiceBus, MassTransit or the like. While the webservices worked fine, message based communication should be quicker and more reliable.
Finally, before you start to code, make sure that you understand the current system's functionality inside and out. If the new system doesn't do something that the old system did, it will be pretty obvious to the end users straight away.

Resources