Greetings & Welcome hhliu,
Like Jhun pointed, you must consider your current linux box as completely untrusted and unreliable for any job, untill you reformat completelly it's hard drive (or replace it).
Regarding your questions,
1. Why use Swtich after linux? what good about that?
Reasonably you are using the switch to be able to connect multiple hosts with your linux router. Otherwise you would need to have a seperate NIC (network interface card) on your Linux router for each of your hosts. Since you mentioned the switch has an IP address, my guess is that this is a managed switch which is nice! In any case, if you do not require it's features and have any reason, you can easily replace it with a dumb hub or an unmanaged switch.
2. Why there is a router before linux? what good about that?
I can't know for sure, but this is often due to the ISP's policy. Generally, the ISP will want to have you use hardware with a quite standard configuration, in order for him to be able to provide support and find easier what's wrong in case of a problem. In some other cases, ISPs will provide their own pre-configured router and even lock configuration access from you, to enforce traffic/bandwidth limitations on your end.
3. Why not directly connect the modem to the Linux?
There is indeed no reason why you can't do that and from many aspects it would be better. However, support for the modem might prove quite a headache in Linux depending on what connection interface it uses.
Sorry, I don't know if it is clear to you or not, I am not new to linux, I am developer before and I use linux to do software development
Yes, that shows from your methodic approach on treating this assigment
Your plan seems just fine to me. Other than perhaps the fact that using fedora as the OS might slightly complicate the task of security maintenance (I find it to be a quite messy distribution, others would disagree however). Regardless, just remember to take some security measures on your new machine.
1. Take the time to write a solid firewall ruleset.
2. Do a minimum installation and install only what will be used. Remove/deactivate any useless services.
3. Monitor the software updates . You can schedule for them to occur automatically, but I wouldn't trust any package system so much to do it (especially rpm!)
4. Use some software that keeps track of what's hapening on the system and have it mail you the results on a frequent basis.
snort is the most widely used, but you can find many other that suit you by searching (just check at
freshmeat.net for system monitoring / networking / logging tools).
5. Take extra care in services that will be available through the internet. Use chroots if possible and minimize the permissions of nobody user (or whatever user Apache runs as). Take a closer look at apache's configuration options that relate to security and permissions. Also check
modsecurity. Likewise, check php's security related options at php.ini. The vast majority of system breaches in the internet, has web script vulnerabilities as their entry point!
In any case, keep us posted!