|
justinsloan32 wrote: Looking to figure out how to design a desktop and theme for an operating system based off of Linux
You might want to start with thinking about why the OS matters. It will matter for the implementation but why would it matter for the look and behavior of the desktop?
|
|
|
|
|
|
Two books that you can download:
Linux From Scratch[^]
Beyond Linux From Scratch[^]
I started working through LFS when I was in high school but never finished it. It should get you through a lot of the basics (filesystem, booting, daemons, etc). After that I believe BLFS should help you get started on setting up graphics and a desktop environment, but like I said I never got that far. I opted to customise Gnome on an Arch Linux install instead.
|
|
|
|
|
My app has a feature for marking a purchase order as Sent. When clicked, a window with a PDF of a Purchase Order is dsplayed with a Send button on it. Clicking 'Send' will then open an email, pre-addressed to the recipient, with the PO attached.
The problem is this... how can I know for sure that the PO was actually emailed out?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
If this is an in house project then you should know the mail client and there should be an API to actually send the email, eg outlook you can create and send the email without user interaction.
Otherwise you will probably need to use an SMTP server and not rely on the client machine and its mail client which may be anything.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
I didnt ask how to send an email
I asked how I can know for sure that the email was sent
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Oh that's easy, look for it in the sent box.
Your question is unclear, what is the mechanism by which you send the email, server via SMTP or PC via email client or do you magic it across the wire?
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
They're using Outlook so watching the sent folder would probably work. I'd have to account for send failures.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
I would always pop the email with the attachment and let the user send it, the excuse, surely you may want to add a personal note or check that what you are sending is correct.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
The Purchase Order's Status needs to be marked as sent. After a PO is sent it can no longer be edited. So whatever process sends it will alto mark the status as sent.
Again, I KNOW how to send an email. What I need to determine is how to VERIFY that it was sent so the PO status can be changed. This is not something the user will do. It needs to happen automatically.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Send a copy to yourself (the "system") as "confirmation".
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
I would expect the locked event to be implemented when you hand the PO to the mail application not the external apps send event.
Don't they have single pixel graphics that send back to base when an email is opened? That would be another way but I think you are taking on the responsibility outside the purvey of your application.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Mycroft Holmes wrote: Don't they have single pixel graphics that send back to base when an email is opened?
Most email clients have an option to block loading external images to prevent this sort of thing.
And IIRC, GMail will load the external images as soon as the message is received, and serve up a cached version when the message is read. That would let you know that the message had reached its destination, but not that the message had been read.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
It's quite difficult to ensure a mail has really been sent. You can only be sure that it has been submitted to a SMTP server for queuing, if this server is external to your organization. I've seen cases where mails were submitted but a problem prohibited the queue from being treated. You can ask for a delivery confirmation, but the server may be configured to dismiss it.
SO: How to confirm that mail has been delivered or not?[^] confirms this may me a tough task.
Maybe the sending SMTP server has an API which could alow you to do further processing?
noop()
|
|
|
|
|
Surely if it's in the queue, then it has been "sent"; it just hasn't been "received".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
If it is in the queue of the target server, then yes, it has been sent.
I was refering to the queue of the sending/relay server.
noop()
|
|
|
|
|
Richard Deeming wrote: urely if it's in the queue, then it has been "sent"; it just hasn't been "received"
Not necessarily. Email could be down.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
phil.o wrote: You can only be sure that it has been submitted to a SMTP server for queuing
I had a case exactly like that. The email service accepted it but then failed, as marked in their queue, that a gmail server refused it for something like an internal error.
Only way the app could have figured that out was if we had built in support to go check that that email service for success on the email.
Might note the only way we even knew this happened was because I had made a habit of looking for email errors in the email service once a week.
|
|
|
|
|
Logs-crawling, I know that
noop()
|
|
|
|
|
I have a WPF app that hits a SQL server on the network. Pretty simple. At some point I'm going to be adding both tablet and web components, so I need to introduce a WebAPI. I will probably use an Asp.Net MVC WebAPI.
Here's the question...
Right now my UI calls the BL, which in turn calls the DAL. That will then become:
Client => Controller => BL => DAL
The BL methods will then need to be async, correct?
EmployeeController
[HttpGet]
public async Task<List<EmployeeEntity>> GetAllEmployees()
{
return await GetBL().GetAllEmployees();
}
and
BL
private async List<EmployeeEntity> GetAllEmployees()
{
var t = await Task.Factory.StartNew(() =>
{
return _dal.GetAllEmployees();
});
return t;
}
This works and it's pretty simple, but is this the right approach for async? I'm open to suggestion.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
modified 10-May-19 12:16pm.
|
|
|
|
|
Using Task.Factory.StartNew just to push the work onto a background thread seems like a code-smell.
Ideally, the code should be async all the way down:
public async Task<List<EmployeeEntity>> GetAllEmployees()
{
return await _dal.GetAllEmployees();
}
If there's a compelling reason blocking you from making the DAL async, then you're not gaining anything by making the BL async. Just have a synchronous BL, and a synchronous controller method. The client can still make an async request to your API.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
OK, I see. So here's a mockup. How's this look?
Controller
public class TestController : Controller
{
BL _bl = new BL();
[HttpGet]
public async Task> GetAllEmployees()
{
return await _bl.GetAllEmployeesAsync();
}
}
BL
public class BL
{
DAL _dal = new DAL();
public async Task> GetAllEmployeesAsync()
{
return await _dal.GetAllEmployeesAsync();
}
}
DAL
public class DAL
{
public async Task> GetAllEmployeesAsync()
{
var t = await Task.Factory.StartNew(() =>
{
var results = new List();
using (var dc = SomeDataContext())
{
}
return results;
});
return t;
}
}
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
You're still using Task.Factory.StartNew to push synchronous work onto a background thread; it's just in the DAL now.
Assuming you're using Entity Framework, try something like:
public class DAL
{
public async Task<List<EmployeeEntity>> GetAllEmployeesAsync()
{
using (var dc = SomeDataContext())
{
return await dc.Employees.Where(...).ToListAsync();
}
}
}
QueryableExtensions.ToListAsync Method (System.Data.Entity) | Microsoft Docs[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I'm using Mongo and Linq To SQL. Not sure if they're awaitable.
Assuming their not, how do you do async calls with them?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
From what I can see, LINQ to SQL doesn't support async at all. I think it was abandoned before .NET 4.0 came out, so it didn't even have access to the TPL.
Scott Hanselman posted an example of executing a L2S query asynchronously using the old IAsyncResult approach back in 2010:
The Weekly Source Code 51 - Asynchronous Database Access and LINQ to SQL Fun - Scott Hanselman[^]
You might be able to adapt that into something that would work with async/await. But it looks rather messy.
I still think it would be better to leave the DAL, BL, and API as synchronous code. The client can still use async code to call the API.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|