I would say the best "value" in a handgun for someone on a budget would be the S&W M&P 2.0 Compact. It IS the Glock alternative with better ergonomics and iron sights and a decent trigger. The Beretta 92 is a fine gun, but would be more suitable for big hands and the slide safety, not my favorite.... For a first and second handgun, I would probably stick with two that have the same action. If you go the Glock route the 17 would be a fine choice, but as pointed out, many prefer the Glock 19 size (which is the same as the M&P 2.0 Compact) and would still be plenty viable as a home-defense handgun and the additional mag size of the 17 cannot be utilized in NJ, anyway. A full-size M&P 2.0 might be nice, too, with a 4.2" barrel, but I would prefer a 2.0 Compact. As PB pointed out, a 9mm revolver might be an interesting second choice if you want a different action (and because 9mm is a lot cheaper than alternatives). Perhaps my favorite is the venerable Ruger Speed Six in 9mm for a revolver. I am not familiar with newer SIG semi-autos, but I prefer the lower bore axis on the Glocks and M&Ps than older examples I have handled of that well-made brand. A 229 is a nice gun. A CZ in any flavor would be a fine gun, but a Glock for parts practicality, home gunsmithing, etc. just makes more sense. And, the alternate striker from S&W (an American company) has a lot of aftermarket accessories, too. Since you are limited to 10 rounds in the Republik, you may at least want to checkout a Glock 47 (thin Glock 19) and an M&P 2.0 Shield might be interesting. The sky is the limit and caliber choice should be considered as well. For me, 9mm makes the most sense. Everyone is giving you an opinion of what they like, so I will give you mine. I would ask for 3 permits instead of 2 and pay the extra $2 and get something in .22LR besides my other two choices. I would seriously consider getting two copies of the same gun, two Glock 19s for example, or a 19 and a 17(or 26), or an M&P 2.0 9mm and a 2.0 Compact for my range and defensive pistol. My choice would be two M&P 2.0 Compacts, one with a 4" barrel and one with a 3.6" barrel. Sometimes you can get the safety version (NOT the Massachusetts Trigger) at a cheaper price. I've even found the 15-round version cheaper than the 10-round version AND buying two 10-round magazines. Even though a gunsmith could modify to 10 most vendors will not ship to NJ.
Why? To me feels better in the hand and is a better value than a Glock. Use the savings to get mags, a safe, etc.. Both share the SAME magazines, win win, both have the same operation, win, win... The hinge trigger isn't my personal favorite, but it still feels better than the rough Glock one, and the nice ergonomics and grippy surface are a win. ONLY thing with M&P is it is more difficult to upgrade the sights.
By the way, welcome and good luck. My choice for a 22LR would be a Ruger Mark IV 22/45 or 22/45 Lite, although any Ruger Mark II or IV would fit the bill. Or even a Mark III, but I would get some aftermarket parts to make it more like a Mark II. Grabagun is a good outlet with quick shipping, etc. Gun.deals and Gunbroker.com are good ways to find online pricing.