Click here to Skip to main content
15,901,666 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Serves me right for signing its praises.. Pin
Duncan Edwards Jones20-Jan-17 0:28
professionalDuncan Edwards Jones20-Jan-17 0:28 
GeneralRe: Serves me right for signing its praises.. Pin
Mark_Wallace20-Jan-17 2:30
Mark_Wallace20-Jan-17 2:30 
JokeRe: Serves me right for signing its praises.. Pin
Duncan Edwards Jones20-Jan-17 2:36
professionalDuncan Edwards Jones20-Jan-17 2:36 
GeneralRe: Serves me right for signing its praises.. Pin
den2k8819-Jan-17 22:25
professionalden2k8819-Jan-17 22:25 
GeneralRe: Serves me right for signing its praises.. Pin
Daniel Pfeffer19-Jan-17 23:10
professionalDaniel Pfeffer19-Jan-17 23:10 
GeneralRe: Serves me right for signing its praises.. Pin
Nathan Minier20-Jan-17 1:16
professionalNathan Minier20-Jan-17 1:16 
GeneralRe: Serves me right for signing its praises.. Pin
GenJerDan20-Jan-17 2:09
GenJerDan20-Jan-17 2:09 
GeneralEvolution of "Hello World" PinPopular
virang_2119-Jan-17 15:53
virang_2119-Jan-17 15:53 
First there was a Console and "Hello World"

C#
Console.WriteLine("Hello World");


but there was no sepration of concern so we created a method that returns the string

C#
SayHello()
{
	return "Hello World";
}


But it was missing business layer so we created a library and migrated method there

C#
namespace something.BL
{
	public class SomeClass
	{
		SayHello()
		{
			return "Hello World";
		}
	}
}


But there was a database we wanted use so moved it to database and created a data layer to be called from BL.

C#
namespace something.DL
{
	public class SomeDLClass
	{
		SayHello()
		{
			var message = ctx.HelloTable.Select(x=>x.Message).First();
			return message;
		}
	}
}


But our web page was empty so we used Webforms to show it to the world.

C#
protected void Page_Load(object sender, EventArgs e)
{
	if(!Page.IsPostBack)
	{
	 	var result = BL.SayHello();
		lblMessage.Text = result;
	}
}


But Webforms are things of the past so migrated it to MVC

C#
public class HomeController : Controller
{
        
        public ActionResult Index()
        {
			var model = BL.SayHello();
			return View(model);
		}
}


But that was not good as it slowed down page load so moved it out of MVC to make an AJAX call using JQuery.

JavaScript
$.ajax({

		 url: '/api/Hello/GetHello',
		 type: 'GET',
		 dataType: 'json',
		 success: function (data, textStatus, xhr) {
			$('#someId') = data;
		 },
		 error: function (xhr, textStatus, errorThrown) {
			 console.log('Error in Operation');
		 }

 });


But JQuery is directly manipulating DOM so we moved to Angular/VueJs/Aurelia etc.etc.

Let use {{message}} to bind to label and create a module to house the application
and a componenet that calls an Angular service which in trun calls Web API and returns Observable.

HtmlPage->Angular Component ->Angular Service ->Web API and back again.


What will be next for the poor old "Hello World" ?

Zen and the art of software maintenance : rm -rf *

Maths is like love : a simple idea but it can get complicated.

GeneralRe: Evolution of "Hello World" Pin
Mike Hankey19-Jan-17 16:04
mveMike Hankey19-Jan-17 16:04 
JokeRe: Evolution of "Hello World" PinPopular
Sander Rossel19-Jan-17 21:25
professionalSander Rossel19-Jan-17 21:25 
GeneralRe: Evolution of "Hello World" Pin
megaadam19-Jan-17 21:41
professionalmegaadam19-Jan-17 21:41 
GeneralRe: Evolution of "Hello World" Pin
Dominic Burford19-Jan-17 22:06
professionalDominic Burford19-Jan-17 22:06 
GeneralRe: Evolution of "Hello World" Pin
Ravi Bhavnani19-Jan-17 22:21
professionalRavi Bhavnani19-Jan-17 22:21 
PraiseRe: Evolution of "Hello World" Pin
User 1106097919-Jan-17 22:38
User 1106097919-Jan-17 22:38 
GeneralRe: Evolution of "Hello World" Pin
PeejayAdams19-Jan-17 22:38
PeejayAdams19-Jan-17 22:38 
GeneralRe: Evolution of "Hello World" Pin
Foothill20-Jan-17 3:19
professionalFoothill20-Jan-17 3:19 
GeneralRe: Evolution of "Hello World" Pin
PeejayAdams20-Jan-17 3:46
PeejayAdams20-Jan-17 3:46 
GeneralRe: Evolution of "Hello World" Pin
Marc Clifton20-Jan-17 1:56
mvaMarc Clifton20-Jan-17 1:56 
GeneralRe: Evolution of "Hello World" Pin
Sander Rossel20-Jan-17 1:59
professionalSander Rossel20-Jan-17 1:59 
GeneralRe: Evolution of "Hello World" Pin
Mark_Wallace20-Jan-17 2:26
Mark_Wallace20-Jan-17 2:26 
GeneralRe: Evolution of "Hello World" Pin
virang_2120-Jan-17 11:49
virang_2120-Jan-17 11:49 
GeneralRe: Evolution of "Hello World" Pin
Sander Rossel20-Jan-17 12:37
professionalSander Rossel20-Jan-17 12:37 
GeneralRe: Evolution of "Hello World" Pin
Dominic Burford19-Jan-17 22:05
professionalDominic Burford19-Jan-17 22:05 
GeneralRe: Evolution of "Hello World" Pin
OriginalGriff19-Jan-17 22:43
mveOriginalGriff19-Jan-17 22:43 
GeneralRe: Evolution of "Hello World" Pin
Daniel Pfeffer20-Jan-17 0:03
professionalDaniel Pfeffer20-Jan-17 0:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.