|
Whoever set up most of those photos should have his camera taken away, the majority are black beard with a black background, even some of the white bearded ones have white shirts on.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
None of them are photoshopped, but most of them ought to be.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Buncha slackers these days. They used to be truly epic.[^]
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
#3[^] is a friend of mine. I'll let him know he's famous on CP now
- S
50 cups of coffee and you know it's on!
Code, follow, or get out of the way.
|
|
|
|
|
Continuing the tale of my diving into ASP.NET Razor for this Department of Public Works project...
jQuery is awesome
Mike Brind[^] is awesome. His articles on Razor and inline grid editor, even though they are for MVC 3, were invaluable. Got a full inline editing WebGrid up and running with add and delete row capability, all using jQuery's post and ajax functions, and using MVC 4. (I hope MVC 5 doesn't have such annoying breaking changes.)
Speaking of which AJAX is cool. I come from a background of maintaining an older Ruby on Rails app where everything requires a page refresh. Yuck. It is really really cool to be doing posts/gets to the server without having to reload the page.
C# / Razor is great. Ah, what a relief not to be working in RoR and using some "real" tools.
I also signed up for a really cheap web hosting service, we'll see how it goes before I give it a thumbs up/down indicator.
Also, after reading about how AngularJS 2.0 is a complete rewrite with no migration path from version 1.3, I've decided not to use it. For what I need, it looks like I might use a wee bit of knockout, but we'll see -- it may be that jQuery can handle all the functionality that I require.
One thing that's slightly annoying is that the view engine is so rigid. I really did love working with Slim/SASS in RoR, and it's unfortunate that the rendering engine can't be easily replaced.
I also find it interesting how easy it is to absolutely ignore the whole "model" part of MVC. Mike's examples use code embedded in the cshtml which as a certain convenience but which I don't like. That means then, if I put the C# code into the controller, I have to make the data available either through a ViewBag (which is where my learning curve is now) or a model (which I'll be migrating the code to next to learn the ins & outs of that.
And while Razor is great and the Html control wrappers are cool, it's really pathetic how to do anything user-friendly, you're pretty much coding in raw HTML.
Oh, and I hate style sheets. I want an editor that, when I mouse over a tag in the cshtml, it tells me what all the styles are that are being applied and allows me to click on the style so I can edit it in the css file. I thought I saw something like that somewhere once.
But I'm quite happy. Two days of concentrated effort have resulted in a grid that with a little polish will become a reusable mainstay component of this project.
Marc
|
|
|
|
|
Glad it's working out.
Marc Clifton wrote: I've decided not to use it. For what I need, it looks like I might use a wee bit of knockout, but we'll see -- it may be that jQuery can handle all the functionality that I require.
Just make sure your JS doesn't look like a big mess of DOM manipulation. It can be so much cleaner -- virtually zero DOM manipulation -- using something like Knockout.
Marc Clifton wrote: I also find it interesting how easy it is to absolutely ignore the whole "model" part of MVC. Mike's examples use code embedded in the cshtml which as a certain convenience but which I don't like. That means then, if I put the C# code into the controller, I have to make the data available either through a ViewBag (which is where my learning curve is now) or a model (which I'll be migrating the code to next to learn the ins & outs of that.
Yep. Personally, if the view is small; if there's just one or two pieces of data from the server I need, ViewBag.WhateverINeed = 42 does the trick. But for anything more than just a couple pieces of data, that's when I use the full View("Index", new MyModel(..)) bits.
|
|
|
|
|
Marc Clifton wrote: Oh, and I hate style sheets.
Make sure you've got Mads Kristensen's Web Essentials[^] installed. It'll make your life so much easier!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: Make sure you've got Mads Kristensen's Web Essentials[^] installed. It'll make your life so much easier!
Wow, thanks for the info - I'll definitely do that!
Marc
|
|
|
|
|
I use Mindscape web workbench[^] to do sass in visual studio. But it is starting to bog down as we've grown the number of files, so I might move to grunt at some point.
|
|
|
|
|
Andy Brummer wrote: I might move to grunt at some point.
This[^] might be useful, then.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks, that's one of the things that made me consider it. I use grunt for a number of tasks when I do wordpress development, and I've had less problems with it than I have with Visual Studio and nuget.
The simple fact that nuget needs a -safe switch says volumes.
|
|
|
|
|
+1 for knockout -- easy to learn and use. Like angular, it can be applied to the DOM selectively so you can start out small.
IMHO the well argued catch-phrase "JavaScript is the Assembly Language of the Web" is mostly correct. CSS should also be included. The JS/CSS chaos is of course what's spawning all of these compilers, frameworks, and tools. The evolution of these higher level abstractions is still in its infancy (think fish with feet) so the ride is going to be rough for a while.
|
|
|
|
|
Using knockout and web API I found I could ignore the controller (as in view controller) part of MVC as well. Who needs loads of view controllers with actions that just return the relevant view?
You just need to tweak the HTTP handler so it's a bit smarter https://github.com/brentj73/ControllerLess[^]
How do you know so much about swallows? Well, you have to know these things when you're a king, you know.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
Brent Jenkins wrote: Who needs loads of view controllers with actions that just return the relevant view?
Exactly. I'm also not quite "getting it" with the whole model thing, other than the model giving you strongly typed fields, which is only marginally useful while in the C# paradigm, of which, when I look at the cshtml file, is maybe 10% of the entire markup. The rest is HTML and jQuery and working with JSON structures.
ControllerLess looks great - thanks for pointing that out.
Marc
|
|
|
|
|
Marc Clifton wrote: It is really really cool to be doing posts/gets to the server without having to reload the page.
If You didn't get there yet, you will see the delight it is to render partial views. Which is a combination of Razor+CodeBehind easy way of rendering and AJAX, without having to deal with Javascript.
blockquote class="quote">Marc Clifton wrote: One thing that's slightly annoying is that the view engine is so rigid.
Could you elaborate on that? My perception is that the view engine is anything but rigid.
Marc Clifton wrote: I have to make the data available either through a ViewBag (which is where my learning curve is now) or a model (which I'll be migrating the code to next to learn the ins & outs of that.
Basically when you use the model instead of the ViewBag, you get a strongly typed view, which can make the view much more maintainable and not error prone. As the model is class, you can also add some behavior to your view models.
Marc Clifton wrote: you're pretty much coding in raw HTML.
I find that an advantage. In my case it not only forced me to really learn HTML, but it also makes it much easier to work on cross-browser bugs as you're in complete control. And in the end, HTML is actually the base for the web, so I think we are back where we should never have left.
Marc Clifton wrote: But I'm quite happy.
Awesome, I'm happy for you.
Marc Clifton wrote: Two days of concentrated effort have resulted in a grid that with a little polish will become a reusable mainstay component of this project.
You should consider jqGrid[^], it saves a lot of time, after you customizes it once. It also deals beautifully with paging.
Happy coding
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
Fabio Franco wrote: You should consider jqGrid[^],
jqGrid looks pretty good. Horrid website though. Why the authors feel that a transparent roll-over for showing enlarged screenshots is actually readable is beyond me. Somebody was definitely smoking something when they were playing with the opacity setting.
I'll look into partial views.
Regarding the view engine, what I would like to do is work with Slim and SASS for lightweight HTML and CSS, but that doesn't seem possible with Razor.
I'm exploring the usefulness of models. Actually, truth be told, I'm exploring the usefulness of the whole MVC concept. It's beginning to strike me as a lot of unnecessary baggage. What I'm leaning toward is a framework that just lets me wire up a method to handle the post/get/etc., otherwise, gets the f*** out of the way.
I'm still evaluating whether the built in security stuff (roles, etc), "authorize" attribute, is implemented in a useable way. I suspect not.
Marc
|
|
|
|
|
Marc Clifton wrote: Somebody was definitely smoking something when they were playing with the opacity setting.
Yeah... developers...
Marc Clifton wrote: I would like to do is work with Slim and SASS for lightweight HTML and CSS, but that doesn't seem possible with Razor.
I never worked with SASS, so I can't give you a definite answer for this, but whatever is supported on pure html, css applications, should be supported with Razor. I never found Razor to limit what you can already do purely in HTML or CSS. You can see Razor as a helper to build dynamic HTML and CSS with less effort.
Marc Clifton wrote: I'm still evaluating whether the built in security stuff (roles, etc), "authorize" attribute, is implemented in a useable way.
Actually it is.Right out of the box you can use the AuthorizeAttribute to restrict access on entire views or actions by decorating them with no other programming required. AuthorizeAttribute will check if the user is logged in to decide wether to serve the Action/View. AllowAnonymous works the same way. For example, you can decorate the class the represents the controller with Authorize , which will make all of its actions require authentication. Later you can decorate one of the actions with Anonymous as an exception for the controller rule.
All of this makes a very safe way to restrict access, even to AJAX calls. Using roles will require a little bit of customization to match the roles of your application specifically. In any case, it hardly requires a lot of work and can save you a a lot of time implementing security.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
Fabio Franco wrote: but whatever is supported on pure html, css applications, should be supported with Razor.
Yes, but that's the point. SASS and Slim are a non-CSS and non-HTML syntax. This is an example of Slim:
body
h1 Markup examples
Indentation is used to determine closing tags.
SASS is like SCSS in that it makes the CSS a lot more readable, but SASS also removes extraneous braces and semicolons, again relying on indentation:
nav
ul
margin: 0
padding: 0
list-style: none
vs. straight CSS:
nav ul {
margin: 0;
padding: 0;
list-style: none;
}
I'm still poking around to see if Razor supports these options. Slim was definitely a Ruby plugin.
Marc
|
|
|
|
|
I actually prefer the traditional syntax, maybe my C/C# background pushes me to prefer it that way. Clear definitions where anything starts or ends. This kind of syntax remembers me of Visual Basic .
Marc Clifton wrote: if Razor supports these options. Slim was definitely a Ruby plugin.
I think that the right question should be if ASP.net supports it or if there is a Visual Studio plugin that will compile that syntax into pure CSS on build, much like it does with type script to javascript. In my experience, this should not have anything to do with the Razor rendering engine itself. Bear in mind that Razor is still compiled in the server side, although it's written in the view.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
MVC supports custom view engines, if you feel inclined to create one. The default is Razor. See: Creating your own MVC View Engine For MVC Application. You could, for example, create a Slim view engine.
Regarding SASS, you can use that in Visual Studio with an MVC application. Web Essentials can compile it, or you can use Compass to watch for changes and automatically compile to CSS.
|
|
|
|
|
Yes folks, I'm finally terminating my dedicated server. It has served me well (harhar), hosting a few sites, being an SVN repository for all my code, providing FTP services, but the day has come to recognize that a dedicated machine is being replaced by:
GitHub
Really cheap website hosting
SquareSpace
GDrive & DropBox
etc...
On the happy side, I will now have an extra $100/mo to play with.
(Oh yeah, lest you ask, it was hosted by ServerBeach -> Peer1. I was quite happy with their service.)
Marc
|
|
|
|
|
Drinks on Marc!
Life is like a s**t sandwich; the more bread you have, the less s**t you eat.
|
|
|
|
|
Every month!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: Every month!
Quite so!
Marc
|
|
|
|
|
Windows hosting is expensive. It's hard to compete with pricing on virtual linux servers like digital ocean[^]
|
|
|
|
|