« first day (1912 days earlier)      last day (3028 days later) » 
00:00 - 21:0021:00 - 00:00

user47589
9:41 PM
i hate angularjs
 
Try meditating before you retire on turning things that you hate into things you love
 
@Amy i still dont get it
seems to be a framework for doing everything
tries to do too much
I'd rather just use jquery and knockout
 
9:56 PM
Or we could just wait so we can stop writing web apps and start creating human-like robots that act as a UI
 
That seahawks game though
 
user47589
10:16 PM
i want to create an AI that creates the AI that writes web apps.
 
user47589
it does try to do too much, @Wardy. and with such a clugdy API
 
10:38 PM
i hit the same problem some time back ... wrote myself a nice little js framework to handle a few bits then realised that i basically didn't even need those
now i just basically have mvc on the server and webapi on the server (with odata sat on top) then i use jquery and knockout on the client
simple, and elegant
i did a bit of wrapping things up, pulled in the free telerik core stuff to use their dataSource with odata
but the rest is just templating work in mvc ... i love razor
I'm building a templating endpoint this week at work that users can add their own templates using either xsl or razor and save them in the system, then later make calls to template with some given data for the model
basically using razor outside of mvc
i plan to use it to do things like template emails, pdf documents reports ect
pretty generic code too
 
Rob
What does odata actually do - if you've already got webapi?
Never used it before
 
its basically a means to turn a webapi endpoint in to a queryable endpoint
you build a model in the same way you do with EF over a DB then you can issue queries to it
my core stack looks something like this ...
odata > business service > EF > datasource (sql, raven, ect)
url > linq > business rules applied > linq to SQL
that's the idea behind it
there's a whole globally defined standard for it
 
Rob
That's pretty awesome actually
How does it handle things like security?
For example, let's say I have access to project A
 
its basically just taking REST and standardising CRUD on top of that
@Rob that's the best bit ... its really down to you what you want to grant access to
I do stuff like build the OData model based on the user making the request
 
Rob
Ah okay
 
10:48 PM
so some endpoints are only visible to some users
 
Rob
Might have to take a look into that
 
and other endpoints might be queryable by all users but only a subset of the collection in the db might be visible to each user
 
Rob
Well it's not so much endpoints, but for example: I can have access to project A but not project B. I should be able to do Projects.Count() (which might return 2 even though I can't view project details)
 
that's why the business services sit in the middle
 
Rob
Right
Will definitely have to take a look at that
 
10:50 PM
ok so lets say you have a table in the db
called Projects
then like me you use EF code first
so you have a PRoject entity
you would also have a project endpoint
then lets say there are 2 projects in the db and you only have access to 1 of them
the standard says when you put a get request in for "~/Projects" you would get 1 project back
by default you would get 2 but my business logic would filter the query on the way down the stack
I'm using this to basically build a middleware platform for the aerospace industry
 
Rob
That's really nice
I was actually looking for something like this
 
im hooking all the various suppliers and buyers to each other and to the people with the money (banks)
 
Rob
Was looking into serializing LINQ over a web request (internal API server)
 
It's actually a bitch to get going with ... I was going to blog about it some time
once up and running though and accepting a few basic rules its friggen awesome
@Rob it basically does that (linq to url) so to speak
a subset of
or more the other way round
url to linq
 
Rob
Yeah
We've got a terrible setup at the moment
We've got about 5 databases all essentially storing the same data
 
10:54 PM
make sure you use odata v4 if you go with it though
 
Rob
And need a reporting API which essentially queries each DB
 
don't use v3
ms have a package on github and in nuget you can just pull in
 
Rob
They're almost the same schema too.. so was looking into having an API which would take linq, transform it a bit, and hit each database and collate the results
 
@Rob yeh that's the templating stuff i was talking about earlier
my plan is to take an odata query and pass that to the templating endpoint
then the result would be my report
@Rob if its literally the same data or very similar you might be able to use automapper too
 
Rob
Ah it's not so much about mapping; that's fine
 
10:56 PM
project it all to a common format and basically build a dto based odata endpoint that sits on all the db's
 
Rob
It's that I want to write Orders.Where(o => o.Id == 5)
One database might have the table named 'CardOrders', one 'Orders', one 'Order' etc
 
yeh that's easy
 
Rob
So it would essentially re-write the LINQ for each provider
 
you won't need to
this is exactly what I created my stack to solve
 
Rob
Awesome, then
 
10:57 PM
and a few other bits like cross db transactions for updating and inserting
 
Rob
One thing left then, is we have a mysql database not externally accessible, with only a PHP api interface
 
you could literally just say to a dto endpoint "get me orders" to get all orders from all db's
 
Rob
Which at least, will give me more reason to get the managers to shut that site down, or migrate to a sane server/language
 
@Rob you can sit that behind odata too
just in case you need the data for something
 
Rob
Yeah, but it's a massive site, and no one here actually knows PHP in our team (apart from the basics)
not going to touch it except for exposing a couple of apis
 
10:59 PM
that's the beuty of the solution
I used EF code first on our existing beast of a bad 15 year old system
generated an EF model
passed the odata query to that
job done
takes all of about 2 hours to get setup
the hardest part for me was the SSO server
each system we have has a webapi app
all the apps share a token provider from a common SSO server
uses ms identity framework
now when i create a new app i make a couple of core setup calls and add about 4 lines to "take part in SSO" and im done
i then just build my odata model
i literally just focus on busines rules now
this is why i was toying with blogging this stuff
think it could be really cool to some people out there
anyway i gotta go ... nakkered ... bed time ... shout if ya need any help with odata ... its neat framework deffo worth a look
later
 
Rob
11:27 PM
Sorry, called into work
will check it out today when I get some free time
 
00:00 - 21:0021:00 - 00:00

« first day (1912 days earlier)      last day (3028 days later) »